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 <sys/types.h>
|
||||||
#include <unistd.h> // for close()
|
#include <unistd.h> // for close()
|
||||||
|
|
||||||
#define closesocket(x) close(x)
|
|
||||||
#define WSAEISCONN EISCONN
|
#define WSAEISCONN EISCONN
|
||||||
#define WSAEINPROGRESS EINPROGRESS
|
#define WSAEINPROGRESS EINPROGRESS
|
||||||
#define WSAEALREADY EALREADY
|
#define WSAEALREADY EALREADY
|
||||||
|
@ -46,6 +45,7 @@ int WSAStartup(int version, WSADATA* data);
|
||||||
int WSAGetLastError(void);
|
int WSAGetLastError(void);
|
||||||
int WSACleanup(void);
|
int WSACleanup(void);
|
||||||
int ioctlsocket(int handle, long cmd, unsigned long* argp);
|
int ioctlsocket(int handle, long cmd, unsigned long* argp);
|
||||||
|
int closesocket(int handle);
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,8 @@ int ioctlsocket(int handle, long cmd, unsigned long* argp) {
|
||||||
return fcntl(handle, F_SETFL, flags);
|
return fcntl(handle, F_SETFL, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int closesocket(int handle) {
|
||||||
|
return close(handle);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue