44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
--- a/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp
|
|
+++ b/Source/Tests/LinuxSyscalls/x32/Semaphore.cpp
|
|
@@ -19,7 +19,7 @@
|
|
#include <string.h>
|
|
#include <sys/ipc.h>
|
|
#include <sys/msg.h>
|
|
-#include <sys/sem.h>
|
|
+#include <linux/sem.h>
|
|
#include <sys/shm.h>
|
|
#include <time.h>
|
|
#include <type_traits>
|
|
@@ -90,6 +90,7 @@
|
|
uint64_t Result{};
|
|
|
|
switch (static_cast<IPCOp>(call)) {
|
|
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 26
|
|
case OP_SEMOP: {
|
|
Result = ::semop(first, reinterpret_cast<struct sembuf*>(ptr), second);
|
|
break;
|
|
@@ -280,6 +281,7 @@
|
|
}
|
|
break;
|
|
}
|
|
+#endif
|
|
case OP_SHMAT: {
|
|
Result = static_cast<FEX::HLE::x32::x32SyscallHandler*>(FEX::HLE::_SyscallHandler)->GetAllocator()->
|
|
shmat(first, reinterpret_cast<const void*>(ptr), second, reinterpret_cast<uint32_t*>(third));
|
|
@@ -377,6 +379,7 @@
|
|
void RegisterSemaphore() {
|
|
REGISTER_SYSCALL_IMPL_X32(ipc, _ipc);
|
|
|
|
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 26
|
|
REGISTER_SYSCALL_IMPL_X32_PASS_MANUAL(semtimedop_time64, semtimedop, [](FEXCore::Core::CpuStateFrame *Frame, int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout) -> uint64_t {
|
|
uint64_t Result = ::semtimedop(semid, sops, nsops, timeout);
|
|
SYSCALL_ERRNO();
|
|
@@ -454,6 +457,7 @@
|
|
}
|
|
SYSCALL_ERRNO();
|
|
});
|
|
+#endif
|
|
|
|
}
|
|
}
|