termux-packages/packages/torsocks/src-lib-syscall.c.patch

30 lines
701 B
Diff
Raw Normal View History

--- ./src/lib/syscall.c.orig 2021-12-03 18:08:08.498816181 +0100
+++ ./src/lib/syscall.c 2021-12-03 18:34:27.357373075 +0100
@@ -437,6 +437,26 @@
2018-11-21 23:45:52 +01:00
return tsocks_libc_syscall(TSOCKS_NR_MEMFD_CREATE, name, flags);
}
+
+
2018-11-21 23:45:52 +01:00
+/*
+ * * Handle clone(2) syscall.
+ * */
+static LIBC_SYSCALL_RET_TYPE handle_clone(va_list args)
+{
+ int (*fn)(void*);
+ void* child_stack;
+ int flags;
+ void* arg;
+
+ fn = va_arg(args, __typeof__(fn));
+ child_stack = va_arg(args, __typeof__(child_stack));
+ flags = va_arg(args, __typeof__(flags));
+ arg = va_arg(args, __typeof__(arg));
+
+ return tsocks_libc_syscall(TSOCKS_NR_CLONE, fn, child_stack, flags, arg);
+}
+
2018-11-21 23:45:52 +01:00
/*
* Handle getdents(2) syscall.
*/