From 1e69f83d9e47530e493d9e4fca8367c5b1827374 Mon Sep 17 00:00:00 2001 From: psucien Date: Sat, 15 Jun 2024 20:04:36 +0200 Subject: [PATCH] libraries: fix for Windows crash during LLE libc initialization --- src/core/libraries/kernel/thread_management.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 804e18c5..0d427ad1 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -526,7 +526,11 @@ int PS4_SYSV_ABI scePthreadMutexattrSetprotocol(ScePthreadMutexattr* attr, int p UNREACHABLE_MSG("Invalid protocol: {}", protocol); } +#if _WIN64 + int result = 0; +#else int result = pthread_mutexattr_setprotocol(&(*attr)->pth_mutex_attr, pprotocol); +#endif (*attr)->pprotocol = pprotocol; return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL; }