summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/xtensa')
-rw-r--r--libc/sysdeps/linux/xtensa/fork.c17
1 files changed, 10 insertions, 7 deletions
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 <unistd.h>
-#include <sys/syscall.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
/* Xtensa doesn't provide a 'fork' system call, so we use 'clone'. */
+#include <sys/syscall.h>
+
+#if defined __NR_clone && defined __ARCH_USE_MMU__
+# include <unistd.h>
+# include <signal.h>
+# include <cancel.h>
-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