diff options
Diffstat (limited to 'libc/sysdeps/linux/common/fork.c')
-rw-r--r-- | libc/sysdeps/linux/common/fork.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c index 884e986ab..b4fa3686d 100644 --- a/libc/sysdeps/linux/common/fork.c +++ b/libc/sysdeps/linux/common/fork.c @@ -7,10 +7,11 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include "syscalls.h" +#include <sys/syscall.h> #include <unistd.h> #ifdef __ARCH_USE_MMU__ + #ifdef __NR_fork extern __typeof(fork) __libc_fork; #define __NR___libc_fork __NR_fork @@ -19,4 +20,17 @@ libc_hidden_proto(fork) weak_alias(__libc_fork,fork) libc_hidden_weak(fork) #endif + +#elif defined __UCLIBC_HAS_STUBS__ + +pid_t __libc_fork(void) +{ + __set_errno(ENOSYS); + return -1; +} +libc_hidden_proto(fork) +weak_alias(__libc_fork,fork) +libc_hidden_weak(fork) +link_warning(fork, "fork: this function is not implemented on no-mmu systems") + #endif |