Date: Tue, 27 Jun 2017 13:45:26 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Kurt Jaeger <lists@opsec.eu> Cc: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>, Gleb Smirnoff <glebius@FreeBSD.org> Subject: Re: Compiler more strict on 12 with r320337 ? Message-ID: <C2440F0F-3A88-4DFD-B2A9-0BC00A2DC0AE@FreeBSD.org> In-Reply-To: <20170627112011.GC65214@home.opsec.eu> References: <20170627063107.GB1256@fc.opsec.eu> <AD6222B5-8777-4A6D-A688-818314968917@gmail.com> <20170627112011.GC65214@home.opsec.eu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On 27 Jun 2017, at 13:20, Kurt Jaeger <lists@opsec.eu> wrote:
>
> Hi!
>
>>> Compiling devel/lfcbase, it fails while including sys/socketvar.h with
>>> this error:
>>>
>>> In file included from Net.cc:36:
>>> /usr/include/sys/socketvar.h:117:4: error: types cannot be declared in an
>>> anonymous struct
>>> enum {
>>> ^
>>> 1 error generated.
>>>
>>> Should sys/socketvar.h be included at all ?
>>
>> Hi Kurt,
>> What compiler/CFLAGS (in particular, -std=<foo>) are you using to compile devel/lfcbase?
>
> http://people.freebsd.org/~pi/logs/lfcbase.txt
>
> says:
>
> /bin/sh ../libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I.. -O3 -O2 -pipe -fstack-protector -fno-strict-aliasing -MT Net.lo -MD -MP -MF .deps/Net.Tpo -c -o Net.lo Net.cc
Ah, this is because you're compiling the header as C++. Normally values
like SQ_NONE, SQ_INCOMP etc are defined as preprocessor macros, not enum
values. Either that should be done, or define the enum should be
declared outside the struct.
-Dimitry
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.30
iEYEARECAAYFAllSRV8ACgkQsF6jCi4glqMVcwCePi0RhM2OpzaC0Iswoh1vmsdl
UhMAn3HQa/NKcchB3DrEhxuBzlwxrzhb
=6nnA
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C2440F0F-3A88-4DFD-B2A9-0BC00A2DC0AE>
