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();