termux-packages/packages/fex/Source-Tests-LinuxSyscalls-...

41 lines
1.5 KiB
Diff

--- a/Source/Tests/LinuxSyscalls/Syscalls/FS.cpp
+++ b/Source/Tests/LinuxSyscalls/Syscalls/FS.cpp
@@ -10,7 +10,7 @@
#include <stddef.h>
#include <stdint.h>
-#include <sys/fanotify.h>
+#include <linux/fanotify.h>
#include <sys/mount.h>
#include <sys/swap.h>
#include <sys/syscall.h>
@@ -149,10 +149,12 @@
});
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 28
REGISTER_SYSCALL_IMPL_PASS(syncfs, [](FEXCore::Core::CpuStateFrame *Frame, int fd) -> uint64_t {
uint64_t Result = ::syncfs(fd);
SYSCALL_ERRNO();
});
+#endif
REGISTER_SYSCALL_IMPL_PASS(setxattr, [](FEXCore::Core::CpuStateFrame *Frame, const char *path, const char *name, const void *value, size_t size, int flags) -> uint64_t {
uint64_t Result = ::setxattr(path, name, value, size, flags);
@@ -214,6 +216,7 @@
SYSCALL_ERRNO();
});
+#ifndef __ANDROID__
REGISTER_SYSCALL_IMPL_PASS(fanotify_init, [](FEXCore::Core::CpuStateFrame *Frame, unsigned int flags, unsigned int event_f_flags) -> uint64_t {
uint64_t Result = ::fanotify_init(flags, event_f_flags);
SYSCALL_ERRNO();
@@ -223,6 +226,7 @@
uint64_t Result = ::fanotify_mark(fanotify_fd, flags, mask, dirfd, pathname);
SYSCALL_ERRNO();
});
+#endif
REGISTER_SYSCALL_IMPL_PASS(pivot_root, [](FEXCore::Core::CpuStateFrame *Frame, const char *new_root, const char *put_old) -> uint64_t {
uint64_t Result = ::syscall(SYSCALL_DEF(pivot_root), new_root, put_old);