From e4b5997fc1cea7eeaad155aad02b8b1997143874 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 21 Apr 2011 21:49:49 +0200 Subject: fork: provide __libc_fork only if THREADS are enabled Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/xtensa/fork.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libc/sysdeps/linux/xtensa') diff --git a/libc/sysdeps/linux/xtensa/fork.c b/libc/sysdeps/linux/xtensa/fork.c index f8b77bfb5..e9b681c67 100644 --- a/libc/sysdeps/linux/xtensa/fork.c +++ b/libc/sysdeps/linux/xtensa/fork.c @@ -7,16 +7,19 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include -#include -#define _SIGNAL_H -#include /* Xtensa doesn't provide a 'fork' system call, so we use 'clone'. */ +#include + +#if defined __NR_clone && defined __ARCH_USE_MMU__ +# include +# include +# include -pid_t __libc_fork(void) +pid_t fork(void) { return (pid_t) INLINE_SYSCALL(clone, 2, SIGCHLD, 0); } -weak_alias(__libc_fork, fork) -libc_hidden_weak(fork) +lt_strong_alias(fork) +lt_libc_hidden(fork) +#endif -- cgit v1.2.3