Fix build on Windows.

Remove some GCC specific pragmas, use #ifdef __GNUC__ in other places.
Only use  pthread_setname_np on Linux.
Fix a mismerge
This commit is contained in:
Vladislav Vaintroub 2017-03-07 14:11:19 +00:00
commit e19f1dd61e
3 changed files with 11 additions and 12 deletions

View file

@ -62,7 +62,7 @@ int Rdb_thread::create_thread(const std::string &thread_name
int err = mysql_thread_create(background_psi_thread_key, &m_handle, nullptr,
thread_func, this);
#ifdef __linux__
if (!err) {
/*
mysql_thread_create() ends up doing some work underneath and setting the
@ -73,6 +73,7 @@ int Rdb_thread::create_thread(const std::string &thread_name
*/
err = pthread_setname_np(m_handle, thread_name.c_str());
}
#endif
return err;
}