From 4206132ea1e6b53ea2fb663e2c71d0d5e062f744 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Wed, 10 Jul 2019 18:03:52 -0400 Subject: [PATCH] use correct function from free bsd pthread --- llarp/util/threading.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llarp/util/threading.cpp b/llarp/util/threading.cpp index 440b95037..38cadf735 100644 --- a/llarp/util/threading.cpp +++ b/llarp/util/threading.cpp @@ -21,15 +21,16 @@ namespace llarp const int rc = pthread_setname_np(name.c_str()); #else #ifdef __FreeBSD__ - pthread_setname_np(pthread_self(), name.c_str()); + const int rc = pthread_setname_np(pthread_self(), name.c_str(), nullptr); #else const int rc = pthread_setname_np(pthread_self(), name.c_str()); +#endif if(rc) { LogError("Failed to set thread name to ", name, " errno = ", rc, " errstr = ", strerror(rc)); } -#endif + #endif #else LogInfo("Thread name setting not supported on this platform");