From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYymo-00061i-Sw for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:29:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYyml-0005tK-NY for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:29:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYyml-0005t6-Ii for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:29:03 -0500 References: <1456414292-55363-1-git-send-email-emaste@freebsd.org> From: Eric Blake Message-ID: <56CF2BCE.6090504@redhat.com> Date: Thu, 25 Feb 2016 09:29:02 -0700 MIME-Version: 1.0 In-Reply-To: <1456414292-55363-1-git-send-email-emaste@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gj9vedj0up3VuuI9A1TUPmxoXgogXM8D3" Subject: Re: [Qemu-devel] [PATCH] io: fix build on FreeBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ed Maste , qemu-devel@nongnu.org, "Daniel P. Berrange" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gj9vedj0up3VuuI9A1TUPmxoXgogXM8D3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/25/2016 08:31 AM, Ed Maste wrote: > EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a > definition. >=20 > Signed-off-by: Ed Maste > --- > tests/test-io-channel-socket.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-soc= ket.c > index 0697363..f4dbd60 100644 > --- a/tests/test-io-channel-socket.c > +++ b/tests/test-io-channel-socket.c > @@ -63,7 +63,10 @@ static int check_protocol_support(bool *has_ipv4, bo= ol *has_ipv6) > =20 > gaierr =3D getaddrinfo("::1", NULL, &hints, &ai); > if (gaierr !=3D 0) { > - if (gaierr =3D=3D EAI_ADDRFAMILY || > + if ( > +#ifdef EAI_ADDRFAMILY > + gaierr =3D=3D EAI_ADDRFAMILY || > +#endif > gaierr =3D=3D EAI_FAMILY || I'm not the biggest-fan of mid-expression #ifdefs. Can we rewrite this to look more like: #ifndef EAI_ADDRFAMILY #define EAI_ADDRFAMILY EAI_FAMILY #endif and leave the conditional expression unchanged? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gj9vedj0up3VuuI9A1TUPmxoXgogXM8D3 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/ iQEcBAEBCAAGBQJWzyvOAAoJEKeha0olJ0NqhHoH/1+/FWOfj3Nt94W9kP9rZZHJ Rr8BpGQuyE4t2AIfeahjk1YpkjGGPSQ4CuUU8f4Ee1lgdOz7jMcFpsAbzN3MNN1q 7m7mVFipxDuXpXePF3q6Lh/33RzkkVF/gFJAsVtVgOLMtLh2twCoe+A5dr7Ax/1C eurL4N7jJzYNxCA0/hoRYyITCatNYJIueHTTFSKiytJWXXU70LLZlAVrGE3BDrGg ttNVnzW2rPjl4lKXITGM0RWI5o/26XVRE4xX8bEUndPLVgZysP2oVZXi6JgWnm12 K+iy2fnfRfvsZHtgMBIgpHTPM5CtJ3qe0rTW1egwYA10Oyn/OgB52sHF3ILTuZ4= =80Gp -----END PGP SIGNATURE----- --gj9vedj0up3VuuI9A1TUPmxoXgogXM8D3--