aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-06-13 08:44:31 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-06-13 08:44:31 +0000
commit05978fa447f79d2bafa925a33b676052205029db (patch)
tree32860e46f25fc53dfb03c468ee1a0286f74af485 /misc.c
parent7cf8caca3f26efb857e42ad664979b5ca57616f4 (diff)
downloadslirp-05978fa447f79d2bafa925a33b676052205029db.zip
slirp-05978fa447f79d2bafa925a33b676052205029db.tar.gz
slirp-05978fa447f79d2bafa925a33b676052205029db.tar.bz2
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 'misc.c')
-rw-r--r--misc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 13ceb0c..fd8b764 100644
--- a/misc.c
+++ b/misc.c
@@ -762,7 +762,7 @@ void fd_nonblock(int fd)
{
#ifdef FIONBIO
#ifdef _WIN32
- long opt = 1;
+ unsigned long opt = 1;
#else
int opt = 1;
#endif
@@ -780,7 +780,11 @@ void fd_nonblock(int fd)
void fd_block(int fd)
{
#ifdef FIONBIO
+#ifdef _WIN32
+ unsigned long opt = 0;
+#else
int opt = 0;
+#endif
ioctlsocket(fd, FIONBIO, &opt);
#else