From 08b99eef682f7903db14b06a8b6037f10c36d87c Mon Sep 17 00:00:00 2001 From: "Daniel R." <47796739+polybiusproxy@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:05:42 +0100 Subject: [PATCH] Attempt to fix non-Windows builds --- src/core/thread.cpp | 2 +- src/core/thread.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/thread.cpp b/src/core/thread.cpp index 81d156dd..355367d8 100644 --- a/src/core/thread.cpp +++ b/src/core/thread.cpp @@ -23,7 +23,7 @@ int Thread::Create(ThreadFunc func, void* arg) { pthread_t* pthr = reinterpret_cast(native_handle); pthread_attr_t pattr; pthread_attr_init(&pattr); - return pthread_create(pthr, &pattr, func, arg); + return pthread_create(pthr, &pattr, (PthreadFunc)func, arg); #endif } diff --git a/src/core/thread.h b/src/core/thread.h index cdb34c84..b1d25c69 100644 --- a/src/core/thread.h +++ b/src/core/thread.h @@ -8,6 +8,7 @@ namespace Core { class Thread { public: using ThreadFunc = void (*)(void*); + using PthreadFunc = void* (*)(void*); Thread(); ~Thread();