Skip to content

Commit

Permalink
fix compilation / ensure this check only runs when compiling on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Oct 13, 2017
1 parent 536b20b commit 3c2de70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion SConscript
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/common/tpt-thread.h
Expand Up @@ -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
Expand Down

0 comments on commit 3c2de70

Please sign in to comment.