aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-03-18 23:14:03 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-03 20:22:41 +0200
commit52d3a48128b66e731afd54cec7cab0a687d303cf (patch)
treeade3bfd91c7e92ed83ea79219ed773fbc009ee0e /src/netbase.h
parent703d64469eb2b607adcd864555b5fe1d981bf51f (diff)
VC2010 compile fixes
Diffstat (limited to 'src/netbase.h')
-rw-r--r--src/netbase.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/netbase.h b/src/netbase.h
index 43189c37e2..9e79de4253 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -9,6 +9,10 @@
#ifdef WIN32
#define _WIN32_WINNT 0x0501
+#define WIN32_LEAN_AND_MEAN 1
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
#include <winsock2.h>
#include <mswsock.h>
#include <ws2tcpip.h>
@@ -29,6 +33,10 @@
extern int nConnectTimeout;
+#ifdef WIN32
+// In MSVC, this is defined as a macro, undefine it to prevent a compile and link error
+#undef SetPort
+#endif
/** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */
class CNetAddr