fex: Disabled (#19893)

* bump(main/fex): 202404

* fex: Disabled
  Refer https://wiki.fex-emu.com/index.php/Termux
This commit is contained in:
tqfx 2024-04-24 20:01:29 +08:00 committed by GitHub
parent 16b0e14a0a
commit 740eea08b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 251 additions and 212 deletions

View File

@ -0,0 +1,16 @@
diff --git a/FEXCore/Source/Common/JitSymbols.cpp b/FEXCore/Source/Common/JitSymbols.cpp
index 662215c..7329773 100644
--- a/FEXCore/Source/Common/JitSymbols.cpp
+++ b/FEXCore/Source/Common/JitSymbols.cpp
@@ -20,9 +20,9 @@ namespace FEXCore {
// We can't use FILE here since we must be robust against forking processes closing our FD from under us.
#ifdef __ANDROID__
// Android simpleperf looks in /data/local/tmp instead of /tmp
- const auto PerfMap = fextl::fmt::format("/data/local/tmp/perf-{}.map", getpid());
+ const auto PerfMap = fextl::fmt::format("@TERMUX_PREFIX@/tmp/perf-{}.map", getpid());
#else
- const auto PerfMap = fextl::fmt::format("/tmp/perf-{}.map", getpid());
+ const auto PerfMap = fextl::fmt::format("@TERMUX_PREFIX@/tmp/perf-{}.map", getpid());
#endif
fd = open(PerfMap.c_str(), O_CREAT | O_TRUNC | O_WRONLY | O_APPEND, 0644);
}

View File

@ -0,0 +1,42 @@
diff --git a/FEXCore/include/FEXCore/Utils/AllocatorHooks.h b/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
index 85d2d91..9997d03 100644
--- a/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
+++ b/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
@@ -117,16 +117,37 @@ namespace FEXCore::Allocator {
inline void *valloc(size_t size)
{
#ifdef __ANDROID__
+#if __ANDROID_API__ < 28
+ // https://github.com/llvm/llvm-project/blob/main/libcxx/include/__memory/aligned_alloc.h
+ // https://android.googlesource.com/platform/bionic/+/main/libc/platform/bionic/page.h
+ // alignment = 1 segfault in Android, 4096 is the minimum
+ void* __result = nullptr;
+ (void)::posix_memalign(&__result, 4096, size);
+ return __result;
+#else
return ::aligned_alloc(4096, size);
+#endif
#else
return ::valloc(size);
#endif
}
+#ifdef __ANDROID__
+ inline int posix_memalign(void** r, size_t a, size_t s) { return ::posix_memalign(r, 4096, s); }
+#else
inline int posix_memalign(void** r, size_t a, size_t s) { return ::posix_memalign(r, a, s); }
+#endif
inline void *realloc(void* ptr, size_t size) { return ::realloc(ptr, size); }
inline void free(void* ptr) { return ::free(ptr); }
inline size_t malloc_usable_size(void *ptr) { return ::malloc_usable_size(ptr); }
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+ inline void *aligned_alloc(size_t a, size_t s) {
+ void* __result = nullptr;
+ (void)::posix_memalign(&__result, 4096, s);
+ return __result;
+ }
+#else
inline void *aligned_alloc(size_t a, size_t s) { return ::aligned_alloc(a, s); }
+#endif
inline void aligned_free(void* ptr) { return ::free(ptr); }
#endif

View File

@ -0,0 +1,13 @@
diff --git a/FEXCore/unittests/APITests/FileLoading.cpp b/FEXCore/unittests/APITests/FileLoading.cpp
index e1b7169..2f20314 100644
--- a/FEXCore/unittests/APITests/FileLoading.cpp
+++ b/FEXCore/unittests/APITests/FileLoading.cpp
@@ -3,7 +3,7 @@
TEST_CASE("LoadFile-Doesn'tExist") {
fextl::string MapsFile;
- auto Read = FEXCore::FileLoading::LoadFile(MapsFile, "/tmp/a/b/c/d/e/z");
+ auto Read = FEXCore::FileLoading::LoadFile(MapsFile, "@TERMUX_PREFIX@/tmp/a/b/c/d/e/z");
REQUIRE(MapsFile.size() == 0);
REQUIRE(Read == false);
}

View File

@ -0,0 +1,34 @@
diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp
index 1430479..67ca3e7 100644
--- a/Source/Common/Config.cpp
+++ b/Source/Common/Config.cpp
@@ -392,6 +392,7 @@ namespace JSON {
FEXCore::Config::Load();
auto Args = FEX::ArgLoader::Get();
+ size_t i = 0;
if (LoadProgramConfig) {
if (Args.empty()) {
@@ -399,8 +400,19 @@ namespace JSON {
return {};
}
- Args[0] = RecoverGuestProgramFilename(std::move(Args[0]), ExecFDInterp, ProgramFDFromEnv);
- fextl::string& Program = Args[0];
+ // really bad workaround for Termux Proot
+ for (size_t j=0; j<Args.size(); j++) {
+ if (Args[j] == "-U") continue;
+ if (Args[j] == "LD_LIBRARY_PATH") continue;
+ if (Args[j] == "-E") continue;
+ if (Args[j] == "LD_PRELOAD=") continue;
+ if (Args[j] == "-0") continue;
+ i=j;
+ break;
+ }
+
+ Args[i] = RecoverGuestProgramFilename(std::move(Args[i]), ExecFDInterp, ProgramFDFromEnv);
+ fextl::string& Program = Args[i];
bool Wine = false;
fextl::string ProgramName;

View File

@ -0,0 +1,16 @@
diff --git a/Source/Tools/FEXLoader/ELFCodeLoader.h b/Source/Tools/FEXLoader/ELFCodeLoader.h
index ffb5ec1..fdbb098 100644
--- a/Source/Tools/FEXLoader/ELFCodeLoader.h
+++ b/Source/Tools/FEXLoader/ELFCodeLoader.h
@@ -182,7 +182,11 @@ class ELFCodeLoader final : public FEX::CodeLoader {
do {
// This is guaranteed to not be interrupted by a signal,
// since fewer than 256 bytes of RNG data are requested
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+ Result = syscall(__NR_getrandom, Data, DataSize, 0);
+#else
Result = getrandom(Data, DataSize, 0);
+#endif
} while (Result != -1 && Result != DataSize);
return Result != -1;

View File

@ -0,0 +1,19 @@
diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
index bf74c64..2a64a73 100644
--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
+++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
@@ -33,6 +33,14 @@ $end_info$
#include <unistd.h>
#include <utility>
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
+#include <sys/mman.h>
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
+#ifndef MFD_CLOEXEC
+#define MFD_CLOEXEC 0x0001U
+#endif
+
namespace FEX::EmulatedFile {
/**
* @brief Generates a temporary file using raw FDs

View File

@ -0,0 +1,23 @@
diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp
index 0f5b166..73db0a5 100644
--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp
+++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/SignalDelegator.cpp
@@ -41,6 +41,18 @@ $end_info$
#define SS_AUTODISARM (1U << 31)
#endif
+/*
+/home/builder/.termux-build/fex/src/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp:931:24: error: expected unqualified-id
+ constexpr uint32_t SA_RESTORER = 0x04000000;
+ ^
+/home/builder/.termux-build/_cache/android-r26b-api-24-v0/sysroot/usr/include/aarch64-linux-android/asm/signal.h:21:21: note: expanded from macro 'SA_RESTORER'
+#define SA_RESTORER 0x04000000
+ ^
+*/
+#ifdef SA_RESTORER
+#undef SA_RESTORER
+#endif
+
namespace FEX::HLE {
#ifdef _M_X86_64
__attribute__((naked))

View File

@ -0,0 +1,19 @@
diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/Utils/Threads.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/Utils/Threads.cpp
index d49f05c..fb7732f 100644
--- a/Source/Tools/LinuxEmulation/LinuxSyscalls/Utils/Threads.cpp
+++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/Utils/Threads.cpp
@@ -31,8 +31,13 @@ namespace FEX::LinuxEmulation::Threads {
// Keep the first item in the stack pool
void *Ptr{};
- for (auto it = DeadStackPool.begin(); it != DeadStackPool.end();) {
+ /*
+ /home/builder/.termux-build/fex/src/Source/Tools/LinuxEmulation/LinuxSyscalls/Utils/Threads.cpp: error: no member named 'atomic_ref' in namespace 'std'
auto Ready = std::atomic_ref<bool>(it->ReadyToBeReaped);
+ ~~~~~^
+ */
+ for (auto it = DeadStackPool.begin(); it != DeadStackPool.end();) {
+ std::atomic<bool> Ready(it->ReadyToBeReaped);
bool ReadyToBeReaped = Ready.load();
if (Ptr == nullptr && ReadyToBeReaped) {
Ptr = it->Ptr;

View File

@ -0,0 +1,28 @@
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);

View File

@ -0,0 +1,25 @@
diff --git a/Source/Tools/LinuxEmulation/VDSO_Emulation.cpp b/Source/Tools/LinuxEmulation/VDSO_Emulation.cpp
index 75f05c8..a5b622f 100644
--- a/Source/Tools/LinuxEmulation/VDSO_Emulation.cpp
+++ b/Source/Tools/LinuxEmulation/VDSO_Emulation.cpp
@@ -18,6 +18,11 @@
#include <sys/time.h>
#include <unistd.h>
+// Add macros which are missing in some versions of <elf.h>
+#ifndef ELF32_ST_VISIBILITY
+#define ELF32_ST_VISIBILITY(o) ((o) & 0x3)
+#endif
+
namespace FEX::VDSO {
FEXCore::Context::VDSOSigReturn VDSOPointers{};
namespace VDSOHandlers {
@@ -253,7 +258,7 @@ namespace FEX::VDSO {
int rv;
} *args = reinterpret_cast<ArgsRV_t*>(ArgsRV);
- int Result = ::getcpu(args->cpu, args->node);
+ int Result = FHU::Syscalls::getcpu(args->cpu, args->node);
args->rv = SyscallRet(Result);
}
}

View File

@ -0,0 +1,13 @@
diff --git a/Source/Tools/pidof/pidof.cpp b/Source/Tools/pidof/pidof.cpp
index 568c84c..86dee1f 100644
--- a/Source/Tools/pidof/pidof.cpp
+++ b/Source/Tools/pidof/pidof.cpp
@@ -52,7 +52,7 @@ void LoadOptions(int argc, char **argv) {
Separator = Options["d"];
for (const auto &Omit: Options.all("o")) {
- std::istringstream ss{Omit};
+ std::istringstream ss{Omit.c_str()};
std::string sub;
while (std::getline(ss, sub, ',')) {
int64_t pid;

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://fex-emu.com/
TERMUX_PKG_DESCRIPTION="Fast x86 emulation frontend"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2312.1
TERMUX_PKG_VERSION=2404
TERMUX_PKG_SRCURL=git+https://github.com/FEX-Emu/FEX
TERMUX_PKG_GIT_BRANCH=FEX-${TERMUX_PKG_VERSION}
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++"
@ -11,13 +11,13 @@ TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686, x86_64"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_TESTS=OFF
-DBUILD_FEXCONFIG=OFF
-DENABLE_ASSERTIONS=ON
-DENABLE_GDB_SYMBOLS=ON
-DENABLE_JEMALLOC=OFF
-DENABLE_JEMALLOC_GLIBC_ALLOC=OFF
-DENABLE_LTO=OFF
-DENABLE_OFFLINE_TELEMETRY=OFF
-DENABLE_TERMUX_BUILD=ON
-DHAS_CLANG_PRESERVE_ALL=OFF
-DTUNE_ARCH=armv8-a
-DTUNE_CPU=generic
@ -30,6 +30,7 @@ termux_pkg_auto_update() {
}
termux_step_pre_configure() {
LDFLAGS+=" -landroid-shmem"
find "${TERMUX_PKG_SRCDIR}" -name '*.h' -o -name '*.c' -o -name '*.cpp' | \
xargs -P"${TERMUX_MAKE_PROCESSES}" -n1 \
sed \

View File

@ -1,210 +0,0 @@
diff --git a/FEXCore/Source/Utils/Allocator/IntrusiveArenaAllocator.h b/FEXCore/Source/Utils/Allocator/IntrusiveArenaAllocator.h
index 97a879a03..436fd16ee 100644
--- a/FEXCore/Source/Utils/Allocator/IntrusiveArenaAllocator.h
+++ b/FEXCore/Source/Utils/Allocator/IntrusiveArenaAllocator.h
@@ -9,19 +9,21 @@
#include <bitset>
#include <cstddef>
-#ifdef TERMUX_BUILD
+
#ifdef __has_include
#if __has_include(<memory_resource>)
-#error Termux <experimental/memory_resource> workaround can be removed
-#endif
-#endif
+#include <memory_resource>
+namespace fex_pmr = std::pmr;
+#else
#include <experimental/memory_resource>
#include <experimental/list>
namespace fex_pmr = std::experimental::pmr;
+#endif
#else
#include <memory_resource>
namespace fex_pmr = std::pmr;
#endif
+
#include <sys/user.h>
#include <mutex>
diff --git a/FEXCore/include/FEXCore/Utils/AllocatorHooks.h b/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
index 85d2d914d..9997d03cb 100644
--- a/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
+++ b/FEXCore/include/FEXCore/Utils/AllocatorHooks.h
@@ -117,16 +117,37 @@ namespace FEXCore::Allocator {
inline void *valloc(size_t size)
{
#ifdef __ANDROID__
+#if __ANDROID_API__ < 28
+ // https://github.com/llvm/llvm-project/blob/main/libcxx/include/__memory/aligned_alloc.h
+ // https://android.googlesource.com/platform/bionic/+/main/libc/platform/bionic/page.h
+ // alignment = 1 segfault in Android, 4096 is the minimum
+ void* __result = nullptr;
+ (void)::posix_memalign(&__result, 4096, size);
+ return __result;
+#else
return ::aligned_alloc(4096, size);
+#endif
#else
return ::valloc(size);
#endif
}
+#ifdef __ANDROID__
+ inline int posix_memalign(void** r, size_t a, size_t s) { return ::posix_memalign(r, 4096, s); }
+#else
inline int posix_memalign(void** r, size_t a, size_t s) { return ::posix_memalign(r, a, s); }
+#endif
inline void *realloc(void* ptr, size_t size) { return ::realloc(ptr, size); }
inline void free(void* ptr) { return ::free(ptr); }
inline size_t malloc_usable_size(void *ptr) { return ::malloc_usable_size(ptr); }
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+ inline void *aligned_alloc(size_t a, size_t s) {
+ void* __result = nullptr;
+ (void)::posix_memalign(&__result, 4096, s);
+ return __result;
+ }
+#else
inline void *aligned_alloc(size_t a, size_t s) { return ::aligned_alloc(a, s); }
+#endif
inline void aligned_free(void* ptr) { return ::free(ptr); }
#endif
diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp
index 5d6cfed33..74918edd1 100644
--- a/Source/Common/Config.cpp
+++ b/Source/Common/Config.cpp
@@ -371,6 +371,7 @@ namespace JSON {
FEXCore::Config::Load();
auto Args = FEX::ArgLoader::Get();
+ size_t i = 0;
if (LoadProgramConfig) {
if (Args.empty()) {
@@ -378,8 +379,19 @@ namespace JSON {
return {};
}
- Args[0] = RecoverGuestProgramFilename(std::move(Args[0]), ExecFDInterp, ProgramFDFromEnv);
- fextl::string& Program = Args[0];
+ // really bad workaround for Termux Proot
+ for (size_t j=0; j<Args.size(); j++) {
+ if (Args[j] == "-U") continue;
+ if (Args[j] == "LD_LIBRARY_PATH") continue;
+ if (Args[j] == "-E") continue;
+ if (Args[j] == "LD_PRELOAD=") continue;
+ if (Args[j] == "-0") continue;
+ i=j;
+ break;
+ }
+
+ Args[i] = RecoverGuestProgramFilename(std::move(Args[i]), ExecFDInterp, ProgramFDFromEnv);
+ fextl::string& Program = Args[i];
bool Wine = false;
fextl::string ProgramName;
diff --git a/Source/Tools/CMakeLists.txt b/Source/Tools/CMakeLists.txt
index 357d16cd0..08c836886 100644
--- a/Source/Tools/CMakeLists.txt
+++ b/Source/Tools/CMakeLists.txt
@@ -5,10 +5,10 @@ if (NOT MINGW_BUILD)
add_subdirectory(FEXConfig/)
endif()
- if (NOT TERMUX_BUILD)
+ #if (NOT TERMUX_BUILD)
# Disable FEXRootFSFetcher on Termux, it doesn't even work there
add_subdirectory(FEXRootFSFetcher/)
- endif()
+ #endif()
if (ENABLE_GDB_SYMBOLS)
add_subdirectory(FEXGDBReader/)
diff --git a/Source/Tools/FEXLoader/ELFCodeLoader.h b/Source/Tools/FEXLoader/ELFCodeLoader.h
index 03ff0fa34..d29620b14 100644
--- a/Source/Tools/FEXLoader/ELFCodeLoader.h
+++ b/Source/Tools/FEXLoader/ELFCodeLoader.h
@@ -182,7 +182,11 @@ class ELFCodeLoader final : public FEXCore::CodeLoader {
do {
// This is guaranteed to not be interrupted by a signal,
// since fewer than 256 bytes of RNG data are requested
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+ Result = syscall(__NR_getrandom, Data, DataSize, 0);
+#else
Result = getrandom(Data, DataSize, 0);
+#endif
} while (Result != -1 && Result != DataSize);
return Result != -1;
diff --git a/Source/Tools/FEXLoader/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp b/Source/Tools/FEXLoader/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
index 03b73436c..fc1041b4b 100644
--- a/Source/Tools/FEXLoader/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
+++ b/Source/Tools/FEXLoader/LinuxSyscalls/EmulatedFiles/EmulatedFiles.cpp
@@ -32,6 +32,14 @@ $end_info$
#include <unistd.h>
#include <utility>
+#if defined(__ANDROID__) && __ANDROID_API__ < 30
+#include <sys/mman.h>
+#define memfd_create(name,flags) syscall(SYS_memfd_create,name,flags)
+#endif
+#ifndef MFD_CLOEXEC
+#define MFD_CLOEXEC 0x0001U
+#endif
+
namespace FEX::EmulatedFile {
/**
* @brief Generates a temporary file using raw FDs
diff --git a/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp b/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp
index db49bc7dc..99638dbec 100644
--- a/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp
+++ b/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp
@@ -40,6 +40,18 @@ $end_info$
#define SS_AUTODISARM (1U << 31)
#endif
+/*
+/home/builder/.termux-build/fex/src/Source/Tools/FEXLoader/LinuxSyscalls/SignalDelegator.cpp:931:24: error: expected unqualified-id
+ constexpr uint32_t SA_RESTORER = 0x04000000;
+ ^
+/home/builder/.termux-build/_cache/android-r26b-api-24-v0/sysroot/usr/include/aarch64-linux-android/asm/signal.h:21:21: note: expanded from macro 'SA_RESTORER'
+#define SA_RESTORER 0x04000000
+ ^
+*/
+#ifdef SA_RESTORER
+#undef SA_RESTORER
+#endif
+
namespace FEX::HLE {
#ifdef _M_X86_64
__attribute__((naked))
diff --git a/Source/Tools/FEXLoader/VDSO_Emulation.cpp b/Source/Tools/FEXLoader/VDSO_Emulation.cpp
index 0572ec148..b8e642267 100644
--- a/Source/Tools/FEXLoader/VDSO_Emulation.cpp
+++ b/Source/Tools/FEXLoader/VDSO_Emulation.cpp
@@ -18,6 +18,15 @@
#include <sys/time.h>
#include <unistd.h>
+// Add macros which are missing in some versions of <elf.h>
+#ifndef ELF32_ST_VISIBILITY
+#define ELF32_ST_VISIBILITY(o) ((o) & 0x3)
+#endif
+
+#ifndef ELF64_ST_VISIBILITY
+#define ELF64_ST_VISIBILITY(o) ((o) & 0x3)
+#endif
+
namespace FEX::VDSO {
FEXCore::Context::VDSOSigReturn VDSOPointers{};
namespace VDSOHandlers {
@@ -253,7 +262,7 @@ namespace FEX::VDSO {
int rv;
} *args = reinterpret_cast<ArgsRV_t*>(ArgsRV);
- int Result = ::getcpu(args->cpu, args->node);
+ int Result = FHU::Syscalls::getcpu(args->cpu, args->node);
args->rv = SyscallRet(Result);
}
}