mirror of https://github.com/encounter/SDL.git
cmake: fix detection of pthread_setname_np() on Apple platforms.
This commit is contained in:
parent
853ee9a3e6
commit
718a880f91
|
@ -991,7 +991,11 @@ macro(CheckPTHREAD)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
pthread_setname_np(pthread_self());
|
||||||
|
#else
|
||||||
pthread_setname_np(pthread_self(), \"\");
|
pthread_setname_np(pthread_self(), \"\");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}" HAVE_PTHREAD_SETNAME_NP)
|
}" HAVE_PTHREAD_SETNAME_NP)
|
||||||
if (HAVE_PTHREAD_NP_H)
|
if (HAVE_PTHREAD_NP_H)
|
||||||
|
|
Loading…
Reference in New Issue