Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix pthread deprecation warning, fixes #502
  • Loading branch information
wolfy1339 authored and jacob1 committed Oct 13, 2017
1 parent 553b36b commit 536b20b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SConscript
Expand Up @@ -473,7 +473,7 @@ elif GetOption('release'):

if GetOption('static'):
if platform == "Windows":
env.Append(CPPDEFINES=['PTW32_STATIC_LIB'])
env.Append(CPPDEFINES=['_PTW32_STATIC_LIB'])
if msvc:
env.Append(CPPDEFINES=['ZLIB_WINAPI'])
else:
Expand Down
9 changes: 8 additions & 1 deletion src/common/tpt-thread.h
Expand Up @@ -2,7 +2,7 @@
#define TPT_THREAD_H

#if defined(WIN) && defined(__GNUC__)
#define TH_ENTRY_POINT __attribute__((force_align_arg_pointer))
#define TH_ENTRY_POINT __attribute__((force_align_arg_pointer))
#define _TIMESPEC_DEFINED
#else
#define TH_ENTRY_POINT
Expand All @@ -16,4 +16,11 @@
#include <pthread.h>
#undef GetUserName

// Fix deprecation warnings with recent pthread versions on Windows
#ifdef _PTW32_STATIC_LIB
#if PTW32_VERSION =< 2, 8, 0, 0
#define PTW32_STATIC_LIB
#endif
#endif

#endif

0 comments on commit 536b20b

Please sign in to comment.