diff options
Diffstat (limited to 'src/3rdparty/forkfd/forkfd_linux.c')
-rw-r--r-- | src/3rdparty/forkfd/forkfd_linux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c index 23a2f35238..4dacc1919d 100644 --- a/src/3rdparty/forkfd/forkfd_linux.c +++ b/src/3rdparty/forkfd/forkfd_linux.c @@ -84,7 +84,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid) return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid); #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \ - defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) + defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \ + defined(__loongarch__) /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures, * but since both values are 0, there's no harm. */ return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls); @@ -156,7 +157,7 @@ static int system_forkfd_pidfd_set_flags(int pidfd, int flags) int system_vforkfd(int flags, pid_t *ppid, int (*childFn)(void *), void *token, int *system) { - __attribute__((aligned(64))) char childStack[4096]; + __attribute__((aligned(64))) char childStack[SIGSTKSZ]; pid_t pid; int pidfd; unsigned long cloneflags = CLONE_PIDFD | CLONE_VFORK | CLONE_VM | SIGCHLD; |