From owner-freebsd-current@freebsd.org Tue Jun 27 11:45:47 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E680DA828B for ; Tue, 27 Jun 2017 11:45:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 24AD82D4E; Tue, 27 Jun 2017 11:45:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.avinity.tv (unknown [77.95.97.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 88FD0325A5; Tue, 27 Jun 2017 13:45:37 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_DC409271-CBD8-4F7D-9B72-09B9DC179BE8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Compiler more strict on 12 with r320337 ? Date: Tue, 27 Jun 2017 13:45:26 +0200 In-Reply-To: <20170627112011.GC65214@home.opsec.eu> Cc: "Ngie Cooper (yaneurabeya)" , FreeBSD Current , Gleb Smirnoff To: Kurt Jaeger References: <20170627063107.GB1256@fc.opsec.eu> <20170627112011.GC65214@home.opsec.eu> X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 11:45:47 -0000 --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 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) 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--