Commit e07d7980 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Patched to compile on Mac OS X (I think).

parent 3d8f0392
......@@ -73,20 +73,14 @@ SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
return (0);
}
/* make pthread_setname_np() a weak reference even without SDK support. */
#if __MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
int pthread_setname_np(const char*) __attribute__((weak_import,visibility("default")));
#elif __IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED < 30200)
int pthread_setname_np(const char*) __attribute__((weak_import));
#endif
void
SDL_SYS_SetupThread(const char *name)
{
int i;
sigset_t mask;
#if __MACOSX__ || __IPHONEOS__
#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
(__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
if (pthread_setname_np != NULL) { pthread_setname_np(name); }
#elif HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(pthread_self(), name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment