Refactor BSD socket errors for Win32 and add EMSGSIZE

This commit is contained in:
Cameron Gutman
2026-03-28 15:03:38 -05:00
parent 62687809b1
commit 7022b337a9

View File

@@ -42,18 +42,31 @@ extern in_port_t n3ds_udp_port;
#endif
#define EINTR WSAEINTR
#ifdef __MINGW32__
#ifdef EWOULDBLOCK
#undef EWOULDBLOCK
#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
#ifdef EINPROGRESS
#undef EINPROGRESS
#endif
#define EINPROGRESS WSAEINPROGRESS
#ifdef ETIMEDOUT
#undef ETIMEDOUT
#endif
#define ETIMEDOUT WSAETIMEDOUT
#ifdef ECONNREFUSED
#undef ECONNREFUSED
#endif
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EINPROGRESS WSAEINPROGRESS
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#ifdef EMSGSIZE
#undef EMSGSIZE
#endif
#define EMSGSIZE WSAEMSGSIZE
typedef int SOCK_RET;
typedef int SOCKADDR_LEN;