summaryrefslogtreecommitdiff
path: root/src/porting.h
diff options
context:
space:
mode:
authorPavel Puchkin <i@neoascetic.me>2015-08-27 20:51:07 +0200
committerest31 <MTest31@outlook.com>2015-09-06 05:34:02 +0200
commit588f0c1fb03db162c573ac92b13f0de465e3040c (patch)
tree1058be0e83790ed74aee60f9756341554afa0e85 /src/porting.h
parent91bf68e1fee1dd82fe1ed1d7aaeb895321260d95 (diff)
downloadminetest-588f0c1fb03db162c573ac92b13f0de465e3040c.tar.gz
minetest-588f0c1fb03db162c573ac92b13f0de465e3040c.tar.bz2
minetest-588f0c1fb03db162c573ac92b13f0de465e3040c.zip
Fix building on OSX, broken since "Clean up threading"
Commit e4bff8be94c0db4f94e63ad448d0eeb869ccdbbd - Clean up threading by @ShadowNinja has broken the OSX build. Including things inside a namespace isn't good. Also fixes #3124.
Diffstat (limited to 'src/porting.h')
-rw-r--r--src/porting.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/porting.h b/src/porting.h
index 492c9d3a8..a4016e8d7 100644
--- a/src/porting.h
+++ b/src/porting.h
@@ -108,6 +108,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <CoreFoundation/CoreFoundation.h>
#endif
+#ifndef _WIN32 // Posix
+ #include <sys/time.h>
+ #include <time.h>
+ #if defined(__MACH__) && defined(__APPLE__)
+ #include <mach/clock.h>
+ #include <mach/mach.h>
+ #endif
+#endif
+
namespace porting
{
@@ -158,10 +167,6 @@ void initIrrlicht(irr::IrrlichtDevice * );
Overflow can occur at any value higher than 10000000.
*/
#ifdef _WIN32 // Windows
-#ifndef _WIN32_WINNT
- #define _WIN32_WINNT 0x0501
-#endif
- #include <windows.h>
inline u32 getTimeS()
{
@@ -190,12 +195,6 @@ void initIrrlicht(irr::IrrlichtDevice * );
}
#else // Posix
-#include <sys/time.h>
-#include <time.h>
-#if defined(__MACH__) && defined(__APPLE__)
-#include <mach/clock.h>
-#include <mach/mach.h>
-#endif
inline u32 getTimeS()
{