diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-06-13 08:44:31 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-06-13 08:44:31 +0000 |
commit | c5b76b381081680633e2e0a91216507430409fb2 (patch) | |
tree | 193b8be4f6c9dac6664e03c7cdcf2bce8eb3bf16 /slirp | |
parent | 487fefdb1e94098ea734cb10e9e17d5860dde2d1 (diff) |
Fix mingw32 build warnings
Work around buffer and ioctlsocket argument type signedness problems
Suppress a prototype which is unused on mingw32
Expand a macro to avoid warnings from some GCC versions
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'slirp')
-rw-r--r-- | slirp/misc.c | 6 | ||||
-rw-r--r-- | slirp/socket.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/slirp/misc.c b/slirp/misc.c index 0137e75ed1..1391d491d7 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 098132a1bb..82d026c703 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; |