Received: from eggs.gnu.org ([2001:4830:134:3::10]:53219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYyQA-0004UH-Tv for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:05:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYyQ6-0007ad-TL for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:05:42 -0500 Received: from [72.143.111.78] (port=37369 helo=freebsd.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYyQ6-0007aI-NQ for qemu-devel@nongnu.org; Thu, 25 Feb 2016 11:05:38 -0500 From: Ed Maste Date: Thu, 25 Feb 2016 10:31:32 -0500 Message-Id: <1456414292-55363-1-git-send-email-emaste@freebsd.org> Subject: [Qemu-devel] [PATCH] io: fix build on FreeBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ed Maste EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a definition. Signed-off-by: Ed Maste --- tests/test-io-channel-socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.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, bool *has_ipv6) gaierr = getaddrinfo("::1", NULL, &hints, &ai); if (gaierr != 0) { - if (gaierr == EAI_ADDRFAMILY || + if ( +#ifdef EAI_ADDRFAMILY + gaierr == EAI_ADDRFAMILY || +#endif gaierr == EAI_FAMILY || gaierr == EAI_NONAME) { *has_ipv6 = false; -- 2.4.6