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