]> granicus.if.org Git - libevent/commitdiff
Fix winsock2.h #include issues with MSVC
authorPeter Rosin <peda@lysator.liu.se>
Wed, 25 May 2011 09:04:43 +0000 (11:04 +0200)
committerNick Mathewson <nickm@torproject.org>
Wed, 25 May 2011 23:44:06 +0000 (19:44 -0400)
Define WIN32_LEAN_AND_MEAN, so that windows.h does not bring in
winsock.h which in turn makes it impossible to #include <winsock2.h>
(at least with MSVC)

test/bench.c
test/bench_cascade.c

index c92bee3b187ae79d29a950cd83f016a2626d99ab..1d25076efcb6324b97e357e6df484539b53fc941 100644 (file)
@@ -41,6 +41,7 @@
 #include <sys/time.h>
 #endif
 #ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #else
 #include <sys/socket.h>
index fef174faed29f0eabd9414fa785cf71b48373b28..908c61701c738f1fb3327b7160e0f586afe4b4c2 100644 (file)
@@ -33,6 +33,7 @@
 #include <sys/time.h>
 #endif
 #ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #else
 #include <sys/socket.h>