include cleanups: remove unused headers and add feature test macros
[musl] / src / process / vfork.c
index 32a7a6e..fc4adb4 100644 (file)
@@ -1,8 +1,12 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
+#include "libc.h"
 
-pid_t vfork(void)
+pid_t __vfork(void)
 {
        /* vfork syscall cannot be made from C code */
-       return syscall0(__NR_fork);
+       return syscall(SYS_fork);
 }
+
+weak_alias(__vfork, vfork);