aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/debug.h3
-rw-r--r--src/jthread/jmutex.h5
-rw-r--r--src/porting.h7
3 files changed, 12 insertions, 3 deletions
diff --git a/src/debug.h b/src/debug.h
index 69a215a42..56952427c 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -32,6 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
+ #ifndef _WIN32_WINNT
+ #define _WIN32_WINNT 0x0500
+ #endif
#include <windows.h>
#ifdef _MSC_VER
#include <eh.h>
diff --git a/src/jthread/jmutex.h b/src/jthread/jmutex.h
index 6675162a5..e528aeb4a 100644
--- a/src/jthread/jmutex.h
+++ b/src/jthread/jmutex.h
@@ -30,6 +30,9 @@
#define JMUTEX_H
#if (defined(WIN32) || defined(_WIN32_WCE))
+ #ifndef _WIN32_WINNT
+ #define _WIN32_WINNT 0x0500
+ #endif
#ifndef _WIN32_WCE
#include <process.h>
#endif // _WIN32_WCE
@@ -88,7 +91,7 @@ public:
void signal() {
SetEvent(hEvent);
}
-}
+};
#else
diff --git a/src/porting.h b/src/porting.h
index 03d2fcbd3..d7d107340 100644
--- a/src/porting.h
+++ b/src/porting.h
@@ -40,14 +40,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
//#define ALIGNOF(type) offsetof (alignment_trick<type>, member)
#ifdef _WIN32
+ #ifndef _WIN32_WINNT
+ #define _WIN32_WINNT 0x0500
+ #endif
#include <windows.h>
#define sleep_ms(x) Sleep(x)
#else
#include <unistd.h>
#include <stdint.h> //for uintptr_t
-
- #if defined(linux) || defined(__linux)
+
+ #if (defined(linux) || defined(__linux)) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif