Skip to content

Commit

Permalink
turn closesocket into a function (#409)
Browse files Browse the repository at this point in the history
Co-authored-by: Dethrace Engineering Department <[email protected]>
  • Loading branch information
BSzili and dethrace-labs authored Sep 19, 2024
1 parent d47c7a0 commit 16048ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/harness/include/harness/winsock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <sys/types.h>
#include <unistd.h> // for close()

#define closesocket(x) close(x)
#define WSAEISCONN EISCONN
#define WSAEINPROGRESS EINPROGRESS
#define WSAEALREADY EALREADY
Expand All @@ -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 */

Expand Down
4 changes: 4 additions & 0 deletions src/harness/win95/winsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 16048ad

Please sign in to comment.