From 01a1a6120cf3cbac1e35ed3e759176fa3be3bbb5 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 2 Sep 2015 13:11:34 +0200 Subject: [PATCH] Porting: include system headers outside namespace block We might end up with unexpected results if we include system headers within a namespace {} block. This fixes issue #3124 compile error with curl enabled on musl libc. --- src/porting.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/porting.h b/src/porting.h index 492c9d3a8..4e9db6733 100644 --- a/src/porting.h +++ b/src/porting.h @@ -59,6 +59,12 @@ with this program; if not, write to the Free Software Foundation, Inc., #else #include #include //for uintptr_t + #include + #include + #if defined(__MACH__) && defined(__APPLE__) + #include + #include + #endif #if (defined(linux) || defined(__linux) || defined(__GNU__)) && !defined(_GNU_SOURCE) #define _GNU_SOURCE @@ -161,8 +167,6 @@ void initIrrlicht(irr::IrrlichtDevice * ); #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif - #include - inline u32 getTimeS() { return GetTickCount() / 1000; @@ -190,13 +194,6 @@ void initIrrlicht(irr::IrrlichtDevice * ); } #else // Posix -#include -#include -#if defined(__MACH__) && defined(__APPLE__) -#include -#include -#endif - inline u32 getTimeS() { struct timeval tv;