Skip to content

Commit 16048ad

Browse files
turn closesocket into a function (#409)
Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
1 parent d47c7a0 commit 16048ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/harness/include/harness/winsock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <sys/types.h>
2424
#include <unistd.h> // for close()
2525

26-
#define closesocket(x) close(x)
2726
#define WSAEISCONN EISCONN
2827
#define WSAEINPROGRESS EINPROGRESS
2928
#define WSAEALREADY EALREADY
@@ -46,6 +45,7 @@ int WSAStartup(int version, WSADATA* data);
4645
int WSAGetLastError(void);
4746
int WSACleanup(void);
4847
int ioctlsocket(int handle, long cmd, unsigned long* argp);
48+
int closesocket(int handle);
4949

5050
#endif /* _WIN32 */
5151

src/harness/win95/winsock.c

+4
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ int ioctlsocket(int handle, long cmd, unsigned long* argp) {
2424
return fcntl(handle, F_SETFL, flags);
2525
}
2626

27+
int closesocket(int handle) {
28+
return close(handle);
29+
}
30+
2731
#endif

0 commit comments

Comments
 (0)