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>
diff --git a/net.c b/net.c
index 039f78b..58d68b5 100644
--- a/net.c
+++ b/net.c
@@ -665,7 +665,9 @@
 #endif
 static VLANClientState *slirp_vc;
 
+#ifndef _WIN32
 static void slirp_smb(const char *exported_dir);
+#endif
 static void slirp_redirection(Monitor *mon, const char *redir_str);
 
 int slirp_can_output(void)
@@ -1505,7 +1507,7 @@
 {
     NetSocketState *s = vc->opaque;
 
-    return sendto(s->fd, buf, size, 0,
+    return sendto(s->fd, (void *)buf, size, 0,
                   (struct sockaddr *)&s->dgram_dst, sizeof(s->dgram_dst));
 }
 
@@ -1517,7 +1519,7 @@
     uint8_t buf1[4096];
     const uint8_t *buf;
 
-    size = recv(s->fd, buf1, sizeof(buf1), 0);
+    size = recv(s->fd, (void *)buf1, sizeof(buf1), 0);
     if (size < 0) {
         err = socket_error();
         if (err != EWOULDBLOCK)
@@ -1579,7 +1581,7 @@
     NetSocketState *s = opaque;
     int size;
 
-    size = recv(s->fd, s->buf, sizeof(s->buf), 0);
+    size = recv(s->fd, (void *)s->buf, sizeof(s->buf), 0);
     if (size < 0)
         return;
     if (size == 0) {