diff options
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/fork.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c index b67cba05a..b4fa3686d 100644 --- a/libc/sysdeps/linux/common/fork.c +++ b/libc/sysdeps/linux/common/fork.c @@ -11,6 +11,7 @@ #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 |