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>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_DC409271-CBD8-4F7D-9B72-09B9DC179BE8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii
On 27 Jun 2017, at 13:20, Kurt Jaeger <lists@opsec.eu> wrote:
>=20
> Hi!
>=20
>>> Compiling devel/lfcbase, it fails while including sys/socketvar.h =
with
>>> this error:
>>>=20
>>> 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.
>>>=20
>>> Should sys/socketvar.h be included at all ?
>>=20
>> Hi Kurt,
>> 	What compiler/CFLAGS (in particular, -std=3D<foo>) are you using =
to compile devel/lfcbase?
>=20
> http://people.freebsd.org/~pi/logs/lfcbase.txt
>=20
> says:
>=20
> /bin/sh ../libtool  --tag=3DCXX    --mode=3Dcompile 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
--Apple-Mail=_DC409271-CBD8-4F7D-9B72-09B9DC179BE8
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.30
iEYEARECAAYFAllSRV8ACgkQsF6jCi4glqMVcwCePi0RhM2OpzaC0Iswoh1vmsdl
UhMAn3HQa/NKcchB3DrEhxuBzlwxrzhb
=6nnA
-----END PGP SIGNATURE-----
--Apple-Mail=_DC409271-CBD8-4F7D-9B72-09B9DC179BE8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C2440F0F-3A88-4DFD-B2A9-0BC00A2DC0AE>
