From cea9b33acc13e7683e3646fca04953d14e3211b7 Mon Sep 17 00:00:00 2001 From: Luis Henriques Date: Thu, 22 May 2025 15:55:27 +0100 Subject: Fix build in musl libc Function fuse_set_thread_name() assumes that pthread_t is an unsigned long and fails to compile in musl libc with the following: ../lib/util.c: In function 'fuse_set_thread_name': ../lib/util.c:48:28: error: passing argument 1 of 'pthread_setname_np' makes \ pointer from integer without a cast [-Wint-conversion] Fix fuse_set_thread_name() by dropping the 'tid' parameter, as it is always set to pthread_self(). Signed-off-by: Luis Henriques --- lib/util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/util.c') diff --git a/lib/util.c b/lib/util.c index 7583d47..2914f1c 100644 --- a/lib/util.c +++ b/lib/util.c @@ -42,12 +42,11 @@ int libfuse_strtol(const char *str, long *res) return 0; } -void fuse_set_thread_name(unsigned long tid, const char *name) +void fuse_set_thread_name(const char *name) { #ifdef HAVE_PTHREAD_SETNAME_NP - pthread_setname_np(tid, name); + pthread_setname_np(pthread_self(), name); #else - (void)tid; (void)name; #endif } -- cgit v1.2.3