Revert "remove macOS support"

This reverts commit 518ce0187a.
This commit is contained in:
Camille Scholtz
2025-01-30 16:37:01 +01:00
committed by Max Kellermann
parent f15b6a43d3
commit 509786cbf1
33 changed files with 1659 additions and 40 deletions

View File

@@ -28,7 +28,11 @@ SetThreadName(const char *name) noexcept
requires a non-const pointer argument, which we don't have
here */
#ifdef __APPLE__
pthread_setname_np(name);
#else
pthread_setname_np(pthread_self(), name);
#endif
#elif defined(HAVE_PRCTL) && defined(PR_SET_NAME)
prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0);
#else