From patchwork Wed Mar 6 23:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 10842025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D04681515 for ; Thu, 7 Mar 2019 00:00:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD3AC2EF70 for ; Thu, 7 Mar 2019 00:00:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0FB02EF77; Thu, 7 Mar 2019 00:00:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5D3C92EF70 for ; Thu, 7 Mar 2019 00:00:26 +0000 (UTC) Received: from localhost ([127.0.0.1]:41471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1gSX-0004Y5-Fu for patchwork-qemu-devel@patchwork.kernel.org; Wed, 06 Mar 2019 19:00:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1gRB-0003CU-2G for qemu-devel@nongnu.org; Wed, 06 Mar 2019 18:59:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1gRA-0003u9-8c for qemu-devel@nongnu.org; Wed, 06 Mar 2019 18:59:01 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:43760) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1gRA-0003tW-1M for qemu-devel@nongnu.org; Wed, 06 Mar 2019 18:59:00 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id EBD49123F7; Thu, 7 Mar 2019 00:58:58 +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 1_HK5m2Dp_7h; Thu, 7 Mar 2019 00:58:56 +0100 (CET) Received: from function (dhcp-97-35.dsi-ext.ens-lyon.fr [140.77.97.35]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7EE5D123F9; Thu, 7 Mar 2019 00:58:52 +0100 (CET) Received: from samy by function with local (Exim 4.92) (envelope-from ) id 1h1gR1-0007qr-Np; Thu, 07 Mar 2019 00:58:51 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Thu, 7 Mar 2019 00:58:46 +0100 Message-Id: <20190306235850.30110-9-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190306235850.30110-1-samuel.thibault@ens-lyon.org> References: <20190306235850.30110-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PULL 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: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Samuel Thibault , stefanha@redhat.com, jan.kiszka@siemens.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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)