mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-21 05:51:39 +00:00
Replace deprecated pthread functions (#290)
pthread_attr_(set,get)stackaddr are deprecated and don't exist anymore on musl libc
This commit is contained in:
parent
8435322d6a
commit
defd6cd6c0
|
@ -318,7 +318,8 @@ int PS4_SYSV_ABI scePthreadAttrGetstackaddr(const ScePthreadAttr* attr, void** s
|
|||
return SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
||||
int result = pthread_attr_getstackaddr(&(*attr)->pth_attr, stack_addr);
|
||||
size_t stack_size = 0;
|
||||
int result = pthread_attr_getstack(&(*attr)->pth_attr, stack_addr, &stack_size);
|
||||
|
||||
return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
@ -340,7 +341,10 @@ int PS4_SYSV_ABI scePthreadAttrSetstackaddr(ScePthreadAttr* attr, void* addr) {
|
|||
return SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
||||
int result = pthread_attr_setstackaddr(&(*attr)->pth_attr, addr);
|
||||
size_t stack_size = 0;
|
||||
pthread_attr_getstacksize(&(*attr)->pth_attr, &stack_size);
|
||||
|
||||
int result = pthread_attr_setstack(&(*attr)->pth_attr, addr, stack_size);
|
||||
|
||||
return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue