diff options
Diffstat (limited to 'win/inspircd_win32wrapper.h')
-rw-r--r-- | win/inspircd_win32wrapper.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 32dc7fea1..718958166 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -103,12 +103,14 @@ typedef unsigned __int32 uint32_t; #define popen _popen #define pclose _pclose -/* Error macros need to be redirected to winsock error codes */ -#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRINUSE WSAEADDRINUSE -#define EINPROGRESS WSAEWOULDBLOCK -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +/* Error macros need to be redirected to winsock error codes, apart from on VS2010 *SIGH* */ +#if _MSC_VER < 1600 + #define ETIMEDOUT WSAETIMEDOUT + #define ECONNREFUSED WSAECONNREFUSED + #define EADDRINUSE WSAEADDRINUSE + #define EINPROGRESS WSAEWOULDBLOCK + #define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#endif /* Convert formatted (xxx.xxx.xxx.xxx) string to in_addr struct */ CoreExport int insp_inet_pton(int af, const char * src, void * dst); |