Fix pthread deprecation warning, fixes #502
This commit is contained in:
parent
553b36b31c
commit
536b20b164
@ -473,7 +473,7 @@ elif GetOption('release'):
|
|||||||
|
|
||||||
if GetOption('static'):
|
if GetOption('static'):
|
||||||
if platform == "Windows":
|
if platform == "Windows":
|
||||||
env.Append(CPPDEFINES=['PTW32_STATIC_LIB'])
|
env.Append(CPPDEFINES=['_PTW32_STATIC_LIB'])
|
||||||
if msvc:
|
if msvc:
|
||||||
env.Append(CPPDEFINES=['ZLIB_WINAPI'])
|
env.Append(CPPDEFINES=['ZLIB_WINAPI'])
|
||||||
else:
|
else:
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define TPT_THREAD_H
|
#define TPT_THREAD_H
|
||||||
|
|
||||||
#if defined(WIN) && defined(__GNUC__)
|
#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
|
#define _TIMESPEC_DEFINED
|
||||||
#else
|
#else
|
||||||
#define TH_ENTRY_POINT
|
#define TH_ENTRY_POINT
|
||||||
@ -16,4 +16,11 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#undef GetUserName
|
#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
|
#endif
|
||||||
|
Reference in New Issue
Block a user