diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-12 10:05:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-12 10:05:06 -0400 |
commit | a95e18b3589a2ebc4b9a5c741c37bdf083d5057d (patch) | |
tree | f25cc3944da97e6a89494f0ae678c4d4927a8d16 /src/common | |
parent | 985687bc4f99b90ed88ccdbefc820260c299ff23 (diff) | |
parent | 192ed944101174d775d27ac54002ee9bc2708080 (diff) | |
download | tor-a95e18b3589a2ebc4b9a5c741c37bdf083d5057d.tar.gz tor-a95e18b3589a2ebc4b9a5c741c37bdf083d5057d.zip |
Merge branch 'bug9495_redux_v2' into maint-0.2.6
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat_pthreads.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/compat_pthreads.c b/src/common/compat_pthreads.c index f4a6cad154..246076b276 100644 --- a/src/common/compat_pthreads.c +++ b/src/common/compat_pthreads.c @@ -279,7 +279,11 @@ tor_threads_init(void) pthread_mutexattr_init(&attr_recursive); pthread_mutexattr_settype(&attr_recursive, PTHREAD_MUTEX_RECURSIVE); tor_assert(0==pthread_attr_init(&attr_detached)); - tor_assert(0==pthread_attr_setdetachstate(&attr_detached, 1)); +#ifndef PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED 1 +#endif + tor_assert(0==pthread_attr_setdetachstate(&attr_detached, + PTHREAD_CREATE_DETACHED)); threads_initialized = 1; set_main_thread(); } |