src/thread/pthread/SDL_systhread.c
changeset 6605 59132ac5df74
parent 6604 70292a6d7dca
child 6640 44a2e00e7c66
     1.1 --- a/src/thread/pthread/SDL_systhread.c	Tue Oct 23 17:46:57 2012 -0700
     1.2 +++ b/src/thread/pthread/SDL_systhread.c	Tue Oct 23 23:44:56 2012 -0700
     1.3 @@ -39,6 +39,12 @@
     1.4  #endif
     1.5  #endif // __LINUX__
     1.6  
     1.7 +#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
     1.8 +      (__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
     1.9 +#define NEED_DYNAMIC_PTHREAD_SETNAME_NP
    1.10 +#include <dlfcn.h>
    1.11 +#endif
    1.12 +
    1.13  #include "SDL_platform.h"
    1.14  #include "SDL_thread.h"
    1.15  #include "../SDL_thread_c.h"
    1.16 @@ -92,8 +98,7 @@
    1.17      sigset_t mask;
    1.18  
    1.19      if (name != NULL) {
    1.20 -#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
    1.21 -      (__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
    1.22 +#ifdef NEED_DYNAMIC_PTHREAD_SETNAME_NP
    1.23          int (*dynamic_pthread_setname_np)(const char*);
    1.24          *(void**)(&dynamic_pthread_setname_np) = dlsym(RTLD_DEFAULT, "pthread_setname_np");
    1.25          if ( dynamic_pthread_setname_np )