turn closesocket into a function (#409)
Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
This commit is contained in:
parent
d47c7a03d4
commit
16048adbc1
|
@ -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
|
||||
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue