summaryrefslogtreecommitdiff
path: root/storage/rocksdb/rdb_threads.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-03-07 14:11:19 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-03-07 14:11:19 +0000
commite19f1dd61e7cd59efca746a204ecf05648b21c48 (patch)
treed88f1e2c28155fe8bcd9d6885808530d095b3c36 /storage/rocksdb/rdb_threads.cc
parentf9e63b7c59557efd36dfa4b3254cbe8b0af4ff06 (diff)
downloadmariadb-git-e19f1dd61e7cd59efca746a204ecf05648b21c48.tar.gz
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
Diffstat (limited to 'storage/rocksdb/rdb_threads.cc')
-rw-r--r--storage/rocksdb/rdb_threads.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/rocksdb/rdb_threads.cc b/storage/rocksdb/rdb_threads.cc
index 1dd99ba596a..91da0ae818c 100644
--- a/storage/rocksdb/rdb_threads.cc
+++ b/storage/rocksdb/rdb_threads.cc
@@ -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;
}