aboutsummaryrefslogtreecommitdiff
path: root/mp3live~/mp3streamin~.c
diff options
context:
space:
mode:
Diffstat (limited to 'mp3live~/mp3streamin~.c')
-rw-r--r--mp3live~/mp3streamin~.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mp3live~/mp3streamin~.c b/mp3live~/mp3streamin~.c
index d34150b..b01a576 100644
--- a/mp3live~/mp3streamin~.c
+++ b/mp3live~/mp3streamin~.c
@@ -40,7 +40,10 @@
#include <sys/types.h>
#include <string.h>
-#ifndef WIN32
+#ifdef _WIN32
+#include <io.h>
+#include <winsock.h>
+#else
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
@@ -52,11 +55,9 @@
#include <fcntl.h>
#include <stdio.h>
#define SOCKET_ERROR -1
-#else
-#include <winsock.h>
-#endif
+#endif /* _WIN32 */
-#if defined(__APPLE__) || defined(WIN32)
+#if defined(__APPLE__) || defined(_WIN32)
#define MSG_NOSIGNAL 0
#define SOL_TCP IPPROTO_TCP
#endif