diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-08-11 15:42:30 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-08-11 15:42:30 +0000 |
commit | 7b1a97858136d6b7c4a136ba2b8c6da2b9c73fd7 (patch) | |
tree | 1f68f7d02ca65de0f5b6808e77b91dd96a894b7d /src/microhttpd/mhd_threads.c | |
parent | 86503923e80da9f221421c65ff4821c73802a305 (diff) | |
download | libmicrohttpd-7b1a97858136d6b7c4a136ba2b8c6da2b9c73fd7.tar.gz libmicrohttpd-7b1a97858136d6b7c4a136ba2b8c6da2b9c73fd7.zip |
mhd_threads: improve compatibility with pthread_setname_np(3) on QNX
Diffstat (limited to 'src/microhttpd/mhd_threads.c')
-rw-r--r-- | src/microhttpd/mhd_threads.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_threads.c b/src/microhttpd/mhd_threads.c index 713c8348..80a320c8 100644 --- a/src/microhttpd/mhd_threads.c +++ b/src/microhttpd/mhd_threads.c | |||
@@ -84,12 +84,16 @@ static int MHD_set_thread_name_(const MHD_thread_ID_ thread_id, const char *thre | |||
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | ||
87 | #ifndef __QNXNTO__ | ||
87 | /** | 88 | /** |
88 | * Set current thread name | 89 | * Set current thread name |
89 | * @param n name to set | 90 | * @param n name to set |
90 | * @return non-zero on success, zero otherwise | 91 | * @return non-zero on success, zero otherwise |
91 | */ | 92 | */ |
92 | #define MHD_set_cur_thread_name_(n) MHD_set_thread_name_(pthread_self(),(n)) | 93 | #define MHD_set_cur_thread_name_(n) MHD_set_thread_name_(pthread_self(),(n)) |
94 | #else /* __QNXNTO__ */ | ||
95 | #define MHD_set_cur_thread_name_(n) MHD_set_thread_name_(0,(n)) | ||
96 | #endif /* __QNXNTO__ */ | ||
93 | #elif defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) | 97 | #elif defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) |
94 | 98 | ||
95 | /** | 99 | /** |