Whoops, let's not redefine the actual symbol.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 03 Nov 2012 12:11:49 -0400
changeset 6641 45187a87d35b
parent 6640 44a2e00e7c66
child 6642 b716011e53ce
Whoops, let's not redefine the actual symbol.
src/thread/pthread/SDL_systhread.c
--- a/src/thread/pthread/SDL_systhread.c	Sat Nov 03 12:06:27 2012 -0400
+++ b/src/thread/pthread/SDL_systhread.c	Sat Nov 03 12:11:49 2012 -0400
@@ -72,10 +72,10 @@
 
 #if defined(__MACOSX__) || defined(__IPHONEOS__)
 static SDL_bool checked_setname = SDL_FALSE;
-static int (*pthread_setname_np)(const char*) = NULL;
+static int (*ppthread_setname_np)(const char*) = NULL;
 #elif defined(__LINUX__)
 static SDL_bool checked_setname = SDL_FALSE;
-static int (*pthread_setname_np)(pthread_t, const char*) = NULL;
+static int (*ppthread_setname_np)(pthread_t, const char*) = NULL;
 #endif
 int
 SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
@@ -87,9 +87,9 @@
     if (!checked_setname) {
         void *fn = dlsym(RTLD_DEFAULT, "pthread_setname_np");
         #if defined(__MACOSX__) || defined(__IPHONEOS__)
-        pthread_setname_np = (int(*)(const char*)) fn;
+        ppthread_setname_np = (int(*)(const char*)) fn;
         #elif defined(__LINUX__)
-        pthread_setname_np = (int(*)(pthread_t, const char*)) fn;
+        ppthread_setname_np = (int(*)(pthread_t, const char*)) fn;
         #endif
         checked_setname = SDL_TRUE;
     }
@@ -120,11 +120,11 @@
     if (name != NULL) {
         #if defined(__MACOSX__) || defined(__IPHONEOS__) || defined(__LINUX__)
         SDL_assert(checked_setname);
-        if (pthread_setname_np) {
+        if (ppthread_setname_np != NULL) {
             #if defined(__MACOSX__) || defined(__IPHONEOS__)
-            pthread_setname_np(name);
+            ppthread_setname_np(name);
             #elif defined(__LINUX__)
-            pthread_setname_np(pthread_self(), name);
+            ppthread_setname_np(pthread_self(), name);
             #endif
         }
         #elif HAVE_PTHREAD_SETNAME_NP