[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULLv2 08/12] slirp: use "slirp_" prefix for inet_aton() w
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULLv2 08/12] slirp: use "slirp_" prefix for inet_aton() win32 implementation |
Date: |
Thu, 7 Mar 2019 12:51:39 +0100 |
From: Marc-André Lureau <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>
---
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 <fcntl.h>
#include <stdint.h>
-#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)
--
2.20.1
- [Qemu-devel] [PULLv2 00/12] slirp updates, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 02/12] slirp: check for ioctlsocket error and 0-length udp payload., Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 03/12] slirp: check sscanf result when emulating ident, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 05/12] slirp: Mark pieces missing IPv6 support, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 08/12] slirp: use "slirp_" prefix for inet_aton() win32 implementation,
Samuel Thibault <=
- [Qemu-devel] [PULLv2 04/12] slirp: fix big/little endian conversion in ident protocol, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 01/12] slirp: Fix build with gcc 9, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 07/12] slirp: use libslirp migration code, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 1/1] slirp: remove QEMU Makefile.objs, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 12/12] slirp: remove QEMU Makefile.objs, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 09/12] slirp: move sources to src/ subdirectory, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 10/12] slirp: add a standalone Makefile, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 11/12] build-sys: link with slirp as an external project, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 06/12] slirp: adapt a subset of QEMU vmstate code, Samuel Thibault, 2019/03/07
- Re: [Qemu-devel] [PULLv2 00/12] slirp updates, Peter Maydell, 2019/03/08