1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Haiku patch

This commit is contained in:
Jerome Duval
2023-03-26 18:42:08 +02:00
committed by Jérôme Duval
parent 9287d1b837
commit 518f8d69e5
4 changed files with 12 additions and 1 deletions

View File

@ -12,6 +12,8 @@
#ifdef VCMI_WINDOWS
#include <windows.h>
#elif defined(VCMI_HAIKU)
#include <OS.h>
#elif !defined(VCMI_APPLE) && !defined(VCMI_FREEBSD) && !defined(VCMI_HURD)
#include <sys/prctl.h>
#endif
@ -89,6 +91,8 @@ void setThreadName(const std::string &name)
prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
#elif defined(VCMI_APPLE)
pthread_setname_np(name.c_str());
#elif defined(VCMI_HAIKU)
rename_thread(find_thread(NULL), name.c_str());
#endif
}