Patchwork slirp: fix build on mingw32

login
register
mail settings
Submitter Anthony Liguori
Date Aug. 7, 2012, 12:34 a.m.
Message ID <1344299660-4084-1-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/175481/
State New
Headers show

Comments

Anthony Liguori - Aug. 7, 2012, 12:34 a.m.
in_addr_t isn't available on mingw32.  Just use an unsigned long instead.  I
considered typedef'ing in_addr_t on mingw32 but this would potentially be
brittle if mingw32 did introduce the type.

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 slirp/main.h  |    2 +-
 slirp/slirp.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/slirp/main.h b/slirp/main.h
index bf601e2..1f3b84d 100644
--- a/slirp/main.h
+++ b/slirp/main.h
@@ -31,7 +31,7 @@  extern char *exec_shell;
 extern u_int curtime;
 extern fd_set *global_readfds, *global_writefds, *global_xfds;
 extern struct in_addr loopback_addr;
-extern in_addr_t loopback_mask;
+extern unsigned long loopback_mask;
 extern char *username;
 extern char *socket_path;
 extern int towrite_max;
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 9787104..38e0a21 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -30,7 +30,7 @@ 
 /* host loopback address */
 struct in_addr loopback_addr;
 /* host loopback network mask */
-in_addr_t loopback_mask;
+unsigned long loopback_mask;
 
 /* emulated hosts use the MAC addr 52:55:IP:IP:IP:IP */
 static const uint8_t special_ethaddr[ETH_ALEN] = {