summaryrefslogtreecommitdiff
path: root/src/porting.h
diff options
context:
space:
mode:
authorkwolekr <mirrorisim@gmail.com>2013-02-23 12:30:13 -0500
committerkwolekr <mirrorisim@gmail.com>2013-02-25 23:10:54 -0500
commit28c50c16cdeda7de39ed15c17094f3de01287d4c (patch)
tree687d15ba3504f9489df1a003652dbd45e821ff73 /src/porting.h
parent5bd50a2d9060f265d4c8d2fff062cac106ccab7c (diff)
downloadminetest-28c50c16cdeda7de39ed15c17094f3de01287d4c.tar.gz
minetest-28c50c16cdeda7de39ed15c17094f3de01287d4c.tar.bz2
minetest-28c50c16cdeda7de39ed15c17094f3de01287d4c.zip
Fix build on Windows
Diffstat (limited to 'src/porting.h')
-rw-r--r--src/porting.h7
1 files changed, 5 insertions, 2 deletions
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