0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-21 22:06:17 +00:00
termux-packages/disabled-packages/fex/Source-Tools-LinuxEmulation-LinuxSyscalls-x64.patch
tqfx 740eea08b5
fex: Disabled (#19893)
* bump(main/fex): 202404

* fex: Disabled
  Refer https://wiki.fex-emu.com/index.php/Termux
2024-04-24 20:01:29 +08:00

29 lines
1.4 KiB
Diff

diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/x64/Memory.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/x64/Memory.cpp
index 1dbe51d..bda4bc4 100644
--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/x64/Memory.cpp
+++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/x64/Memory.cpp
@@ -103,9 +103,10 @@ namespace FEX::HLE::x64 {
SYSCALL_ERRNO();
});
+ #undef shmat
REGISTER_SYSCALL_IMPL_X64_FLAGS(shmat, SyscallFlags::OPTIMIZETHROUGH | SyscallFlags::NOSYNCSTATEONENTRY,
[](FEXCore::Core::CpuStateFrame *Frame, int shmid, const void *shmaddr, int shmflg) -> uint64_t {
- uint64_t Result = reinterpret_cast<uint64_t>(shmat(shmid, shmaddr, shmflg));
+ uint64_t Result = reinterpret_cast<uint64_t>(::libandroid_shmat(shmid, shmaddr, shmflg));
if (Result != -1) {
FEX::HLE::_SyscallHandler->TrackShmat(Frame->Thread, shmid, Result, shmflg);
@@ -113,9 +114,10 @@ namespace FEX::HLE::x64 {
SYSCALL_ERRNO();
});
+ #undef shmdt
REGISTER_SYSCALL_IMPL_X64_FLAGS(shmdt, SyscallFlags::OPTIMIZETHROUGH | SyscallFlags::NOSYNCSTATEONENTRY,
[](FEXCore::Core::CpuStateFrame *Frame, const void *shmaddr) -> uint64_t {
- uint64_t Result = ::shmdt(shmaddr);
+ uint64_t Result = ::libandroid_shmdt(shmaddr);
if (Result != -1) {
FEX::HLE::_SyscallHandler->TrackShmdt(Frame->Thread, (uintptr_t)shmaddr);