aboutsummaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
Diffstat (limited to 'slirp')
-rw-r--r--slirp/misc.c6
-rw-r--r--slirp/socket.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/slirp/misc.c b/slirp/misc.c
index 0137e75..1391d49 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -778,7 +778,7 @@ fd_nonblock(int fd)
{
#ifdef FIONBIO
#ifdef _WIN32
- long opt = 1;
+ unsigned long opt = 1;
#else
int opt = 1;
#endif
@@ -797,7 +797,11 @@ void
fd_block(int fd)
{
#ifdef FIONBIO
+#ifdef _WIN32
+ unsigned long opt = 0;
+#else
int opt = 0;
+#endif
ioctlsocket(fd, FIONBIO, &opt);
#else
diff --git a/slirp/socket.c b/slirp/socket.c
index 098132a..82d026c 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -474,7 +474,12 @@ sorecvfrom(struct socket *so)
udp_detach(so);
} else { /* A "normal" UDP packet */
struct mbuf *m;
- int len, n;
+ int len;
+#ifdef _WIN32
+ unsigned long n;
+#else
+ int n;
+#endif
if (!(m = m_get())) return;
m->m_data += IF_MAXLINKHDR;