termux-packages/disabled-packages/proot/src-loader-loader.c.patch

27 lines
832 B
Diff
Raw Normal View History

2016-01-09 02:19:06 +01:00
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788113
diff -N -u -r ../PRoot-5.1.0/src/loader/loader.c ./src/loader/loader.c
--- ../PRoot-5.1.0/src/loader/loader.c 2014-12-15 09:18:11.000000000 -0500
+++ ./src/loader/loader.c 2016-01-08 20:16:54.746809929 -0500
@@ -39,6 +39,8 @@
# include "loader/assembly-x86_64.h"
#elif defined(ARCH_ARM_EABI)
# include "loader/assembly-arm.h"
+#elif defined(ARCH_ARM64)
+# include "loader/assembly-arm64.h"
#elif defined(ARCH_X86)
# include "loader/assembly-x86.h"
#else
@@ -134,7 +136,11 @@
/* Fall through. */
case LOAD_ACTION_OPEN:
+#ifdef OPENAT
+ fd = SYSCALL(OPENAT, 4, AT_FDCWD, stmt->open.string_address, O_RDONLY, 0);
+#else
fd = SYSCALL(OPEN, 3, stmt->open.string_address, O_RDONLY, 0);
+#endif
if (unlikely((int) fd < 0))
FATAL();