summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/inspircd_win32wrapper.h14
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);