Commit 092ad50b authored by Luca Boccassi's avatar Luca Boccassi

Problem: I can't refactor

Solution: fix ifdef check for pthread_setname
parent 33246f7a
...@@ -170,16 +170,16 @@ void zmq::thread_t::setThreadName(const char *name_) ...@@ -170,16 +170,16 @@ void zmq::thread_t::setThreadName(const char *name_)
if (!name_) if (!name_)
return; return;
#if defined(HAVE_PTHREAD_SETNAME_1) #if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
int rc = pthread_setname_np(name_); int rc = pthread_setname_np(name_);
posix_assert (rc); posix_assert (rc);
#elif defined(HAVE_PTHREAD_SETNAME_2) #elif defined(ZMQ_HAVE_PTHREAD_SETNAME_2)
int rc = pthread_setname_np(descriptor, name_); int rc = pthread_setname_np(descriptor, name_);
posix_assert (rc); posix_assert (rc);
#elif defined(HAVE_PTHREAD_SETNAME_3) #elif defined(ZMQ_HAVE_PTHREAD_SETNAME_3)
int rc = pthread_setname_np(descriptor, name_, NULL); int rc = pthread_setname_np(descriptor, name_, NULL);
posix_assert (rc); posix_assert (rc);
#elif defined(HAVE_PTHREAD_SET_NAME) #elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
pthread_set_name_np(descriptor, name_); pthread_set_name_np(descriptor, name_);
#endif #endif
} }
......
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