diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 02:41:21 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-08 02:41:21 +0000 |
commit | 1e85d9e01030c7d841ad00d3b044b6ad1bf06011 (patch) | |
tree | 09e695c3473b19b669f01a13c1486f0b6ee76bc1 /libc | |
parent | 388e096fa68a1bb6186efb653e9538e12961d442 (diff) |
New .config option UCLIBC_HAS_STUBS, enables fork() stub on NOMMU
Diffstat (limited to 'libc')
-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 |