diff --git a/src/harness/include/harness/winsock.h b/src/harness/include/harness/winsock.h index 51ab2ee9..46aa8303 100644 --- a/src/harness/include/harness/winsock.h +++ b/src/harness/include/harness/winsock.h @@ -23,7 +23,6 @@ #include #include // for close() -#define closesocket(x) close(x) #define WSAEISCONN EISCONN #define WSAEINPROGRESS EINPROGRESS #define WSAEALREADY EALREADY @@ -46,6 +45,7 @@ int WSAStartup(int version, WSADATA* data); int WSAGetLastError(void); int WSACleanup(void); int ioctlsocket(int handle, long cmd, unsigned long* argp); +int closesocket(int handle); #endif /* _WIN32 */ diff --git a/src/harness/win95/winsock.c b/src/harness/win95/winsock.c index 15e86e83..7d47f344 100644 --- a/src/harness/win95/winsock.c +++ b/src/harness/win95/winsock.c @@ -24,4 +24,8 @@ int ioctlsocket(int handle, long cmd, unsigned long* argp) { return fcntl(handle, F_SETFL, flags); } +int closesocket(int handle) { + return close(handle); +} + #endif