From 11fe823bbd58a2c46e56dd82e7c56791115f2b16 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 25 Jan 2021 14:48:57 -0700 Subject: [PATCH] Update rthreads.c Make it build again on macOS. --- desmume/src/libretro-common/rthreads/rthreads.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desmume/src/libretro-common/rthreads/rthreads.c b/desmume/src/libretro-common/rthreads/rthreads.c index 2cac2909e..45d84f5df 100644 --- a/desmume/src/libretro-common/rthreads/rthreads.c +++ b/desmume/src/libretro-common/rthreads/rthreads.c @@ -75,7 +75,7 @@ struct sthread { #ifdef USE_WIN32_THREADS HANDLE thread; - DWORD thread_id; + DWORD thread_id; #else pthread_t id; #endif @@ -194,7 +194,7 @@ sthread_t *sthread_create_with_priority(void (*thread_func)(void*), void *userda data->userdata = userdata; #ifdef USE_WIN32_THREADS - thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->thread_id); + thread->thread = CreateThread(NULL, 0, thread_wrap, data, 0, &thread->thread_id); thread_created = !!thread->thread; #else pthread_attr_t thread_attr; @@ -314,8 +314,8 @@ void sthread_setname(sthread_t *thread, const char *name) { if (!thread) return; - // TODO: implement that for Windows too. -#ifndef USE_WIN32_THREADS + // TODO: implement that for Windows (and Mac?) too. +#if !defined(USE_WIN32_THREADS) && !defined(__APPLE__) pthread_setname_np(thread->id, name); #endif }