Correct the WINVER check for SRWLOCK.
Fixes #290.
Change-Id: I4ac23149ec964f7ebade83cbec031f82e9a3410a
Reviewed-on: https://code-review.googlesource.com/c/re2/+/58130
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/util/mutex.h b/util/mutex.h
index e2a8715..e1587d5 100644
--- a/util/mutex.h
+++ b/util/mutex.h
@@ -12,6 +12,7 @@
#ifdef _WIN32
// Requires Windows Vista or Windows Server 2008 at minimum.
+#include <windows.h>
#if defined(WINVER) && WINVER >= 0x0600
#define MUTEX_IS_WIN32_SRWLOCK
#endif
@@ -26,7 +27,6 @@
#endif
#if defined(MUTEX_IS_WIN32_SRWLOCK)
-#include <windows.h>
typedef SRWLOCK MutexType;
#elif defined(MUTEX_IS_PTHREAD_RWLOCK)
#include <pthread.h>