summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-21 21:49:49 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:40 +0200
commite4b5997fc1cea7eeaad155aad02b8b1997143874 (patch)
treec5da88f5f87a537913ac8506b30193bde2125d9d /libc/sysdeps/linux/common
parent9df9c60aa93287211cf9698eb979d80fded765dc (diff)
fork: provide __libc_fork only if THREADS are enabled
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/fork.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index 88958b144..fa1f4affa 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/libc/sysdeps/linux/common/fork.c
@@ -8,15 +8,15 @@
*/
#include <sys/syscall.h>
-#include <unistd.h>
-#ifdef __ARCH_USE_MMU__
-
-#ifdef __NR_fork
-#define __NR___libc_fork __NR_fork
-_syscall0(pid_t, __libc_fork)
-weak_alias(__libc_fork,fork)
+#if defined __NR_fork && defined __ARCH_USE_MMU__
+# include <unistd.h>
+# include <cancel.h>
+_syscall0(pid_t, fork)
+# ifdef __UCLIBC_HAS_THREADS__
+strong_alias(fork,__libc_fork)
libc_hidden_weak(fork)
-#endif
-
+# else
+libc_hidden_def(fork)
+# endif
#endif