diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-13 02:06:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-13 02:06:36 +0000 |
commit | bb7ae984f8ae63083dde38587f4a562271856f52 (patch) | |
tree | 38ed9156079e5828ae74546fa9bae97213b7bc50 /thread_pthread.c | |
parent | 75e1b5c845fa8f7b3b0aada80d37d5817bf436a4 (diff) | |
download | ruby-bb7ae984f8ae63083dde38587f4a562271856f52.tar.gz |
configure.in: use pthread_setname_np only if available
* configure.in: check if pthread_setname_np is available.
* thread_pthread.c: pthread_setname_np is not available on old
Darwins. [ruby-core:60524] [Bug #9492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index a4a351076e..f42c51a3b8 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1423,7 +1423,7 @@ timer_thread_sleep(rb_global_vm_lock_t* unused) #if defined(__linux__) && defined(PR_SET_NAME) # define SET_THREAD_NAME(name) prctl(PR_SET_NAME, name) -#elif defined(__APPLE__) +#elif defined(HAVE_PTHREAD_SETNAME_NP) /* pthread_setname_np() on Darwin does not have target thread argument */ # define SET_THREAD_NAME(name) pthread_setname_np(name) #else |