From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnBFj-0000rT-Bd for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnBFd-0000j7-8e for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnBFc-0000iv-Uw for qemu-devel@nongnu.org; Thu, 22 Sep 2016 17:09:49 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F33AC00B6E6 for ; Thu, 22 Sep 2016 21:09:48 +0000 (UTC) References: <20160922205647.18237-1-rkrcmar@redhat.com> From: Eric Blake Message-ID: <22648d3e-df3f-55c3-ca8d-36c7b83362b4@redhat.com> Date: Thu, 22 Sep 2016 16:09:47 -0500 MIME-Version: 1.0 In-Reply-To: <20160922205647.18237-1-rkrcmar@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Xs06UbL2AKLgPnQkB8s6lsxddKMB6M9xO" Subject: Re: [Qemu-devel] [PATCH] build: handle deprecation of major() in sys/types.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Xs06UbL2AKLgPnQkB8s6lsxddKMB6M9xO From: Eric Blake To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , qemu-devel@nongnu.org Message-ID: <22648d3e-df3f-55c3-ca8d-36c7b83362b4@redhat.com> Subject: Re: [Qemu-devel] [PATCH] build: handle deprecation of major() in sys/types.h References: <20160922205647.18237-1-rkrcmar@redhat.com> In-Reply-To: <20160922205647.18237-1-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2016 03:56 PM, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > GCC 6.2.1 stops the build of qga/commands-posix.c with: >=20 > In the GNU C Library, `major' is defined by . > For historical compatibility, it is currently defined by > as well, but we plan to remove this soon. >=20 > To use `major', include directly. > If you did not intend to use a system-defined macro `major', > you should #undef it after including . >=20 > Include for all users of . >=20 > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > --- > include/qemu/osdep.h | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > index 9e9fa6154642..fad31c3d5b56 100644 > --- a/include/qemu/osdep.h > +++ b/include/qemu/osdep.h > @@ -64,6 +64,7 @@ extern int daemon(int, int); > #include > #include > #include > +#include Works for glibc; but is non-standard and not present on some other systems, so this may fail to build elsewhere. You'll probably need a configure probe. Autoconf also says that some platforms have instead of (per its AC_HEADER_MAJOR macro). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Xs06UbL2AKLgPnQkB8s6lsxddKMB6M9xO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX5EibAAoJEKeha0olJ0NqbdgH/iusKAPN433HRwrRHIXU6yDs dDf+qqaKBRpTrieZveWr6Yjyes7yToJXdhszcYLqChyYhV9PFx6b+dq0epLKtsFn 7Rvpbd7BXzIWRaqgiVJTjJ32DvKZuqdgwdiPyqMRRPZq+59rA7vxvMjbao7ujgh2 1Ja64fiJmO7g1qWHNW/KGxsCV52DUws5n5W28LPSTV/dPnWLsp0ADopt3MAONI5x 4r3vhNwrXLh01NNBg46YjqMeqkejh+vgMvQe30jHQfn4Deyze0xpAF3s2CKObxTN 6OCCBbDxaDgEMOHIAumLYKPxeQcchakR7SC55TYF8oj9ej5t0wspo3OD19KzXQQ= =cVM2 -----END PGP SIGNATURE----- --Xs06UbL2AKLgPnQkB8s6lsxddKMB6M9xO--