summaryrefslogtreecommitdiff
path: root/core/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/network.c')
-rw-r--r--core/network.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/network.c b/core/network.c
index 8c8d8875..bc6738ac 100644
--- a/core/network.c
+++ b/core/network.c
@@ -121,9 +121,15 @@ int init_networking(IP ip ,uint16_t port)
121 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); 121 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
122 122
123 /* Check for socket error */ 123 /* Check for socket error */
124 if (sock == INVALID_SOCKET) 124 #ifdef WIN32
125 if (sock == INVALID_SOCKET) //MSDN recommends this
125 return -1; 126 return -1;
126 127 #else
128 if (sock < 0)
129 return -1;
130 #endif
131
132
127 /* Functions to increase the size of the send and receive UDP buffers 133 /* Functions to increase the size of the send and receive UDP buffers
128 NOTE: uncomment if necessary */ 134 NOTE: uncomment if necessary */
129 /* 135 /*