mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-21 20:56:19 +00:00
740eea08b5
* bump(main/fex): 202404 * fex: Disabled Refer https://wiki.fex-emu.com/index.php/Termux
20 lines
730 B
Diff
20 lines
730 B
Diff
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
|