Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Really fixed the Mac build this time.

  • Loading branch information
slouken committed Oct 24, 2012
1 parent dd1e4f4 commit 0f347dbc0f11657b3b4182c3e535ac7ee0727949
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/thread/pthread/SDL_systhread.c
@@ -39,6 +39,12 @@ extern int pthread_setname_np (pthread_t __target_thread, __const char *__name)
#endif
#endif // __LINUX__

#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
(__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
#define NEED_DYNAMIC_PTHREAD_SETNAME_NP
#include <dlfcn.h>
#endif

#include "SDL_platform.h"
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
@@ -92,8 +98,7 @@ SDL_SYS_SetupThread(const char *name)
sigset_t mask;

if (name != NULL) {
#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
(__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
#ifdef NEED_DYNAMIC_PTHREAD_SETNAME_NP
int (*dynamic_pthread_setname_np)(const char*);
*(void**)(&dynamic_pthread_setname_np) = dlsym(RTLD_DEFAULT, "pthread_setname_np");
if ( dynamic_pthread_setname_np )

0 comments on commit 0f347db

Please sign in to comment.