Fix some compilation warnings

This commit is contained in:
momo5502
2025-01-05 19:27:17 +01:00
parent 4f444a7227
commit 3f00cdb181
5 changed files with 19 additions and 4 deletions

View File

@@ -7,11 +7,13 @@
#ifdef _WIN32
using socklen_t = int;
using send_size = int;
#define GET_SOCKET_ERROR() (WSAGetLastError())
#define poll WSAPoll
#define SOCK_WOULDBLOCK WSAEWOULDBLOCK
#else
using SOCKET = int;
using send_size = ssize_t;
#define INVALID_SOCKET (SOCKET)(~0)
#define SOCKET_ERROR (-1)
#define GET_SOCKET_ERROR() (errno)