From 3c2de70564bba5062ac0b510ecacdb9c1a0c30a1 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 13 Oct 2017 00:03:35 -0400 Subject: [PATCH] fix compilation / ensure this check only runs when compiling on windows --- SConscript | 5 ++++- src/common/tpt-thread.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index ee2e92728..1e306432e 100644 --- a/SConscript +++ b/SConscript @@ -473,7 +473,10 @@ elif GetOption('release'): if GetOption('static'): if platform == "Windows": - env.Append(CPPDEFINES=['_PTW32_STATIC_LIB']) + if compilePlatform == "Windows": + env.Append(CPPDEFINES=['_PTW32_STATIC_LIB']) + else: + env.Append(CPPDEFINES=['PTW32_STATIC_LIB']) if msvc: env.Append(CPPDEFINES=['ZLIB_WINAPI']) else: diff --git a/src/common/tpt-thread.h b/src/common/tpt-thread.h index 9299f68a6..276ddd070 100644 --- a/src/common/tpt-thread.h +++ b/src/common/tpt-thread.h @@ -17,8 +17,8 @@ #undef GetUserName // Fix deprecation warnings with recent pthread versions on Windows -#ifdef _PTW32_STATIC_LIB -#if PTW32_VERSION =< 2, 8, 0, 0 +#if defined(_PTW32_STATIC_LIB) && defined(WIN) +#if PTW32_VERSION <= 2, 8, 0, 0 #define PTW32_STATIC_LIB #endif #endif