Fix building on Haiku OS

This commit is contained in:
Cacodemon345
2025-03-14 21:24:36 +06:00
parent aef06552fb
commit 0686045d2a
3 changed files with 20 additions and 2 deletions

View File

@@ -18,6 +18,11 @@
* Copyright 2021-2022 Cacodemon345
* Copyright 2021-2022 Teemu Korhonen
*/
#ifdef __HAIKU__
#include <OS.h>
#endif
#include <cstdio>
#include <mutex>
@@ -828,6 +833,8 @@ plat_set_thread_name(void *thread, const char *name)
pthread_setname_np(truncated);
# elif defined(Q_OS_NETBSD)
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated, "%s");
# elif defined(__HAIKU__)
rename_thread(find_thread(NULL), truncated);
# elif defined(Q_OS_OPENBSD)
pthread_set_name_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
# else