Compilation fix for NetBSD (#7067)

This commit is contained in:
Eladash 2019-12-05 10:28:01 +02:00 committed by Ivan
parent 835892aa51
commit c3862b74b1

View File

@ -1714,7 +1714,7 @@ void thread_base::initialize(bool(*wait_cb)(const void*))
#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
pthread_set_name_np(pthread_self(), m_name.get().c_str());
#elif defined(__NetBSD__)
pthread_setname_np(pthread_self(), "%s", const_cast<void*>(static_cast<void*>(m_name.get().c_str())));
pthread_setname_np(pthread_self(), "%s", const_cast<char*>(m_name.get().c_str()));
#elif !defined(_WIN32)
pthread_setname_np(pthread_self(), m_name.get().substr(0, 15).c_str());
#endif