Commit 11789a4f authored by Sergei Petrunia's avatar Sergei Petrunia

MariaRocks: Only call pthread_setname_np on platforms that support it

This is a second such fix, the first was wiped out in a merge.
parent a72abc8c
......@@ -112,6 +112,7 @@ class Rdb_thread {
pthread_setname_np resolves the issue.
*/
DBUG_ASSERT(!m_name.empty());
#ifdef __linux__
int err = pthread_setname_np(m_handle, m_name.c_str());
if (err)
{
......@@ -120,6 +121,7 @@ class Rdb_thread {
"MyRocks: Failed to set name (%s) for current thread, errno=%d",
m_name.c_str(), errno);
}
#endif
}
void uninit();
......
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