build: Add __FreeBSD__ compilation condition for pthread_setname_np()

This commit is contained in:
armin-25689 2025-06-15 13:03:16 +08:00 committed by Cameron Gutman
parent 1176ca6409
commit 29f298ec88

View File

@ -77,7 +77,7 @@ void* ThreadProc(void* context) {
#if defined(LC_WINDOWS)
setThreadNameWin32(ctx->name);
#elif defined(__linux__)
#elif defined(__linux__) || defined(__FreeBSD__)
pthread_setname_np(pthread_self(), ctx->name);
#elif defined(LC_DARWIN)
pthread_setname_np(ctx->name);