From 29f298ec882aefc0cd2f8e82238676aa3373dc6c Mon Sep 17 00:00:00 2001 From: armin-25689 <83564821+armin-25689@users.noreply.github.com> Date: Sun, 15 Jun 2025 13:03:16 +0800 Subject: [PATCH] build: Add __FreeBSD__ compilation condition for pthread_setname_np() --- src/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platform.c b/src/Platform.c index 7c25fbc..9782e00 100644 --- a/src/Platform.c +++ b/src/Platform.c @@ -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);