Termux: Stub out some syscalls These syscalls are either blacklisted in Android's seccomp policy, or simply not implemented by the running kernel (android kernels lag behind quite a bit!). Whichever of the two it is, calling any of these results in the process being killed with SIGSYS, usually killing the entire process. To prevent this, we stub them with an ENOSYS result, pretending they aren't implemented. --- glibc-2.36.orig/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ glibc-2.36/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -167,7 +167,11 @@ # undef INTERNAL_SYSCALL_RAW # define INTERNAL_SYSCALL_RAW(name, nr, args...) \ ({ long _sys_result; \ - { \ + switch (name) { \ + case SYS_ify(set_robust_list): \ + case SYS_ify(rseq): \ + case SYS_ify(faccessat2): \ + _sys_result = -ENOSYS; break; default: \ LOAD_ARGS_##nr (args) \ register long _x8 asm ("x8") = (name); \ asm volatile ("svc 0 // syscall " # name \