From 588f0c1fb03db162c573ac92b13f0de465e3040c Mon Sep 17 00:00:00 2001 From: Pavel Puchkin Date: Thu, 27 Aug 2015 20:51:07 +0200 Subject: 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. --- src/porting.h | 19 +++++++++---------- src/threading/thread.cpp | 2 +- 2 files changed, 10 insertions(+), 11 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 #endif +#ifndef _WIN32 // Posix + #include + #include + #if defined(__MACH__) && defined(__APPLE__) + #include + #include + #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 inline u32 getTimeS() { @@ -190,12 +195,6 @@ void initIrrlicht(irr::IrrlichtDevice * ); } #else // Posix -#include -#include -#if defined(__MACH__) && defined(__APPLE__) -#include -#include -#endif inline u32 getTimeS() { diff --git a/src/threading/thread.cpp b/src/threading/thread.cpp index a1cb720af..73a951194 100644 --- a/src/threading/thread.cpp +++ b/src/threading/thread.cpp @@ -80,7 +80,7 @@ DEALINGS IN THE SOFTWARE. #include #elif defined(__APPLE__) #include - #include + #include #endif -- cgit v1.2.3