about summary refs log tree commit diff
path: root/src/process
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-05-30 01:51:23 -0400
committerRich Felker <dalias@aerifal.cx>2014-05-30 01:51:23 -0400
commit5cf9e8f860dcfe63b36e050dd7dfbc5e53745fce (patch)
treef29f4bdd839a23d52ca71deed22a8bfe178ef903 /src/process
parent55f45bc7222ec50b72aa8411c61e30184d0ade23 (diff)
downloadmusl-5cf9e8f860dcfe63b36e050dd7dfbc5e53745fce.tar.gz
musl-5cf9e8f860dcfe63b36e050dd7dfbc5e53745fce.tar.xz
musl-5cf9e8f860dcfe63b36e050dd7dfbc5e53745fce.zip
additional fixes for linux kernel apis with old syscalls removed
Diffstat (limited to 'src/process')
-rw-r--r--src/process/vfork.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process/vfork.c b/src/process/vfork.c
index fc4adb46..ac954651 100644
--- a/src/process/vfork.c
+++ b/src/process/vfork.c
@@ -1,12 +1,17 @@
 #define _GNU_SOURCE
 #include <unistd.h>
+#include <signal.h>
 #include "syscall.h"
 #include "libc.h"
 
 pid_t __vfork(void)
 {
 	/* vfork syscall cannot be made from C code */
+#ifdef SYS_fork
 	return syscall(SYS_fork);
+#else
+	return syscall(SYS_clone, SIGCHLD, 0);
+#endif
 }
 
 weak_alias(__vfork, vfork);