Undefine real error codes to fix warnings

This commit is contained in:
Tim Angus 2025-07-18 14:51:04 +01:00
parent dede9aa79a
commit c3248e54a4

View File

@ -46,6 +46,13 @@ typedef int socklen_t;
typedef unsigned short sa_family_t;
# endif
// Undefine existing real error codes and replace
// with our pretend compatibility layer ones
# undef EAGAIN
# undef EADDRNOTAVAIL
# undef EAFNOSUPPORT
# undef ECONNRESET
# define EAGAIN WSAEWOULDBLOCK
# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
# define EAFNOSUPPORT WSAEAFNOSUPPORT