diff options
| author | 2016-07-13 14:15:39 +0100 | |
|---|---|---|
| committer | 2016-07-13 14:15:39 +0100 | |
| commit | 423097c40f2e2c645930ff16954b75c920a80da5 (patch) | |
| tree | cfe40351bfa4f92c52fe6ba643597fe7b86fa02a | |
| parent | ad91a1391ca50a17aa95939db99662103b764e44 (diff) | |
bx: refactor #ifdefs
Fix potential compilation error by ensuring __GLIBC__ is only evaluated
when actually defined.
When __GLIBC__ is defined, we do not need any additional headers on BSD
platforms (hence why using #elif).
| -rw-r--r-- | 3rdparty/bx/include/bx/thread.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/3rdparty/bx/include/bx/thread.h b/3rdparty/bx/include/bx/thread.h index 9e105db1422..bd74f66f4e3 100644 --- a/3rdparty/bx/include/bx/thread.h +++ b/3rdparty/bx/include/bx/thread.h @@ -8,12 +8,13 @@ #if BX_PLATFORM_POSIX # include <pthread.h> -# if defined(BX_PLATFORM_BSD) && !defined(__GLIBC__) +# if defined(__GLIBC__) +# if !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) ) +# include <sys/prctl.h> +# endif +# elif defined(BX_PLATFORM_BSD) # include <pthread_np.h> # endif -# if defined(__GLIBC__) && !( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 12) ) ) -# include <sys/prctl.h> -# endif // defined(__GLIBC__) ... #elif BX_PLATFORM_WINRT using namespace Platform; using namespace Windows::Foundation; |
