From patchwork Thu Feb 25 15:31:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ed Maste X-Patchwork-Id: 8424811 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 61C8B9F314 for ; Thu, 25 Feb 2016 16:06:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D82FE2035B for ; Thu, 25 Feb 2016 16:06:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D93E20279 for ; Thu, 25 Feb 2016 16:06:01 +0000 (UTC) Received: from localhost ([::1]:44118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYyQS-0004Zi-IX for patchwork-qemu-devel@patchwork.kernel.org; Thu, 25 Feb 2016 11:06:00 -0500 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 Received: from emaste (uid 1001) (envelope-from emaste@freebsd.org) id 9fdf0 by freebsd.org (DragonFly Mail Agent 1); Thu, 25 Feb 2016 10:31:32 -0500 From: Ed Maste To: qemu-devel@nongnu.org Date: Thu, 25 Feb 2016 10:31:32 -0500 Message-Id: <1456414292-55363-1-git-send-email-emaste@freebsd.org> X-Mailer: git-send-email 2.4.6 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 72.143.111.78 Cc: Ed Maste Subject: [Qemu-devel] [PATCH] io: fix build on FreeBSD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;