diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/network.c | 3 | ||||
-rw-r--r-- | core/network.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/network.c b/core/network.c index bc6738ac..d4e25c82 100644 --- a/core/network.c +++ b/core/network.c | |||
@@ -166,7 +166,10 @@ int init_networking(IP ip ,uint16_t port) | |||
166 | void shutdown_networking() | 166 | void shutdown_networking() |
167 | { | 167 | { |
168 | #ifdef WIN32 | 168 | #ifdef WIN32 |
169 | closesocket(sock); | ||
169 | WSACleanup(); | 170 | WSACleanup(); |
171 | #else | ||
172 | close(sock); | ||
170 | #endif | 173 | #endif |
171 | return; | 174 | return; |
172 | } | 175 | } |
diff --git a/core/network.h b/core/network.h index 62169d88..3b999cec 100644 --- a/core/network.h +++ b/core/network.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <sys/time.h> | 52 | #include <sys/time.h> |
53 | #include <sys/types.h> | 53 | #include <sys/types.h> |
54 | #include <netdb.h> | 54 | #include <netdb.h> |
55 | #include <unistd.h> | ||
55 | 56 | ||
56 | #endif | 57 | #endif |
57 | 58 | ||