From patchwork Thu Mar 7 11:51:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1052807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44FTXs52Sfz9sMQ for ; Thu, 7 Mar 2019 22:53:17 +1100 (AEDT) Received: from localhost ([127.0.0.1]:49755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1raN-0000NI-Ka for incoming@patchwork.ozlabs.org; Thu, 07 Mar 2019 06:53:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1rZ3-0008Oi-40 for qemu-devel@nongnu.org; Thu, 07 Mar 2019 06:51:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1rZ2-0003XU-9e for qemu-devel@nongnu.org; Thu, 07 Mar 2019 06:51:53 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:35550) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1rZ2-0003WN-1w for qemu-devel@nongnu.org; Thu, 07 Mar 2019 06:51:52 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 15415B15D; Thu, 7 Mar 2019 12:51:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L_0PjkMfkzvK; Thu, 7 Mar 2019 12:51:49 +0100 (CET) Received: from function (dhcp-13-128.lip.ens-lyon.fr [140.77.13.128]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 90E12B164; Thu, 7 Mar 2019 12:51:44 +0100 (CET) Received: from samy by function with local (Exim 4.92) (envelope-from ) id 1h1rYt-0000E1-JF; Thu, 07 Mar 2019 12:51:43 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 12:51:39 +0100 Message-Id: <20190307115143.780-10-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190307115143.780-1-samuel.thibault@ens-lyon.org> References: <20190307115143.780-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PULLv2 08/12] slirp: use "slirp_" prefix for inet_aton() win32 implementation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Samuel Thibault , stefanha@redhat.com, jan.kiszka@siemens.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau To avoid conflict with QEMU inet_aton() implementation, let's use the "slirp_" prefix. This allows to drop the WITH_QEMU, thus the source won't make a distinction when building with QEMU or not. Signed-off-by: Marc-André Lureau Message-Id: <20190212162524.31504-4-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault --- slirp/Makefile.objs | 2 +- slirp/util.c | 4 ++-- slirp/util.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slirp/Makefile.objs b/slirp/Makefile.objs index 69e140f965..e91daf0e91 100644 --- a/slirp/Makefile.objs +++ b/slirp/Makefile.objs @@ -33,4 +33,4 @@ slirp.mo-objs = \ vmstate.o \ $(NULL) -slirp.mo-cflags = -DG_LOG_DOMAIN=\"Slirp\" -DWITH_QEMU +slirp.mo-cflags = -DG_LOG_DOMAIN=\"Slirp\" diff --git a/slirp/util.c b/slirp/util.c index 1cbaa26b60..5ec2fa87ab 100644 --- a/slirp/util.c +++ b/slirp/util.c @@ -31,8 +31,8 @@ #include #include -#if defined(_WIN32) && !defined(WITH_QEMU) -int inet_aton(const char *cp, struct in_addr *ia) +#if defined(_WIN32) +int slirp_inet_aton(const char *cp, struct in_addr *ia) { uint32_t addr = inet_addr(cp); if (addr == 0xffffffff) { diff --git a/slirp/util.h b/slirp/util.h index c4207a49d6..e94ee4e7f1 100644 --- a/slirp/util.h +++ b/slirp/util.h @@ -138,8 +138,8 @@ int slirp_getsockopt_wrap(int sockfd, int level, int optname, #define setsockopt slirp_setsockopt_wrap int slirp_setsockopt_wrap(int sockfd, int level, int optname, const void *optval, int optlen); - -int inet_aton(const char *cp, struct in_addr *ia); +#define inet_aton slirp_inet_aton +int slirp_inet_aton(const char *cp, struct in_addr *ia); #else #define closesocket(s) close(s) #define ioctlsocket(s, r, v) ioctl(s, r, v)