From 02a1a8ec1bd6a9b6ef34588a88a8d2c9e360f37a Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 9 Jan 2024 20:28:10 -0300 Subject: [PATCH] More non-cppthreads build fixes --- src/qt/qt_platform.cpp | 2 +- src/unix/unix.c | 2 +- src/unix/unix_thread.c | 2 +- src/win/win_thread.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 62325e780..09feb5f5e 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -783,7 +783,7 @@ plat_set_thread_name(void *thread, const char *name) if (!thread) pthread_setname_np(truncated); # else - pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated); + pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated); # endif #endif } diff --git a/src/unix/unix.c b/src/unix/unix.c index bbf7556ba..62d3bd36d 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -1395,7 +1395,7 @@ plat_set_thread_name(void *thread, const char *name) if (!thread) pthread_setname_np(truncated); #else - pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated); + pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated); #endif } diff --git a/src/unix/unix_thread.c b/src/unix/unix_thread.c index 9d989fb91..88ce01456 100644 --- a/src/unix/unix_thread.c +++ b/src/unix/unix_thread.c @@ -52,7 +52,7 @@ thread_wait(thread_t *arg) } event_t * -thread_create_event() +thread_create_event(void) { event_pthread_t *event = malloc(sizeof(event_pthread_t)); diff --git a/src/win/win_thread.c b/src/win/win_thread.c index 3136c029c..e874c4941 100644 --- a/src/win/win_thread.c +++ b/src/win/win_thread.c @@ -40,7 +40,7 @@ thread_t * thread_create_named(void (*func)(void *param), void *param, const char *name) { uintptr_t bt = _beginthread(func, 0, param); - plat_set_thread_name(bt, name); + plat_set_thread_name((void *) bt, name); return ((thread_t *) bt); }