summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Rosin <peda@lysator.liu.se>2011-05-26 10:10:57 +0200
committerNick Mathewson <nickm@torproject.org>2011-05-27 23:14:10 -0400
commit816115a17ef5ce6148cf45389ddf8e8a327f206b (patch)
tree90e8809cb9c736f626cbfdf0f14c03e485f994d0
parent203ba2742f2750fd27967b902ba403b6331e40a5 (diff)
downloadlibevent-816115a17ef5ce6148cf45389ddf8e8a327f206b.tar.gz
InitializeCriticalSectionAndSpinCount requires _WIN32_WINNT >= 0x0403.
-rw-r--r--event_iocp.c4
-rw-r--r--evthread_win32.c4
-rw-r--r--listener.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/event_iocp.c b/event_iocp.c
index 254ed90d..75fe4627 100644
--- a/event_iocp.c
+++ b/event_iocp.c
@@ -24,6 +24,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
#include <winsock2.h>
#include <windows.h>
#include <process.h>
diff --git a/evthread_win32.c b/evthread_win32.c
index bd72be15..18dca6d4 100644
--- a/evthread_win32.c
+++ b/evthread_win32.c
@@ -26,6 +26,10 @@
#include "event2/event-config.h"
#ifdef WIN32
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
#include <winsock2.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/listener.c b/listener.c
index d0911bdb..5db2cb73 100644
--- a/listener.c
+++ b/listener.c
@@ -29,6 +29,10 @@
#include "event2/event-config.h"
#ifdef WIN32
+#ifndef _WIN32_WINNT
+/* Minimum required for InitializeCriticalSectionAndSpinCount */
+#define _WIN32_WINNT 0x0403
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <mswsock.h>