src/thread/pthread/SDL_systhread.c
changeset 6641 45187a87d35b
parent 6640 44a2e00e7c66
child 6885 700f1b25f77f
     1.1 --- a/src/thread/pthread/SDL_systhread.c	Sat Nov 03 12:06:27 2012 -0400
     1.2 +++ b/src/thread/pthread/SDL_systhread.c	Sat Nov 03 12:11:49 2012 -0400
     1.3 @@ -72,10 +72,10 @@
     1.4  
     1.5  #if defined(__MACOSX__) || defined(__IPHONEOS__)
     1.6  static SDL_bool checked_setname = SDL_FALSE;
     1.7 -static int (*pthread_setname_np)(const char*) = NULL;
     1.8 +static int (*ppthread_setname_np)(const char*) = NULL;
     1.9  #elif defined(__LINUX__)
    1.10  static SDL_bool checked_setname = SDL_FALSE;
    1.11 -static int (*pthread_setname_np)(pthread_t, const char*) = NULL;
    1.12 +static int (*ppthread_setname_np)(pthread_t, const char*) = NULL;
    1.13  #endif
    1.14  int
    1.15  SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
    1.16 @@ -87,9 +87,9 @@
    1.17      if (!checked_setname) {
    1.18          void *fn = dlsym(RTLD_DEFAULT, "pthread_setname_np");
    1.19          #if defined(__MACOSX__) || defined(__IPHONEOS__)
    1.20 -        pthread_setname_np = (int(*)(const char*)) fn;
    1.21 +        ppthread_setname_np = (int(*)(const char*)) fn;
    1.22          #elif defined(__LINUX__)
    1.23 -        pthread_setname_np = (int(*)(pthread_t, const char*)) fn;
    1.24 +        ppthread_setname_np = (int(*)(pthread_t, const char*)) fn;
    1.25          #endif
    1.26          checked_setname = SDL_TRUE;
    1.27      }
    1.28 @@ -120,11 +120,11 @@
    1.29      if (name != NULL) {
    1.30          #if defined(__MACOSX__) || defined(__IPHONEOS__) || defined(__LINUX__)
    1.31          SDL_assert(checked_setname);
    1.32 -        if (pthread_setname_np) {
    1.33 +        if (ppthread_setname_np != NULL) {
    1.34              #if defined(__MACOSX__) || defined(__IPHONEOS__)
    1.35 -            pthread_setname_np(name);
    1.36 +            ppthread_setname_np(name);
    1.37              #elif defined(__LINUX__)
    1.38 -            pthread_setname_np(pthread_self(), name);
    1.39 +            ppthread_setname_np(pthread_self(), name);
    1.40              #endif
    1.41          }
    1.42          #elif HAVE_PTHREAD_SETNAME_NP