summaryrefslogtreecommitdiff
path: root/libc/stdlib/system.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-04 15:18:54 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-04 15:18:54 +0200
commit36043b37739dffdaea8d31457570810e492268d7 (patch)
tree0045cba85b862ecca89cf7b5aff336bddbabad89 /libc/stdlib/system.c
parenta5352e212fcd4da83c8ff4fe542ef23c8e3187f8 (diff)
parent6d550ddd129b18cf800eab604f74536754526cd8 (diff)
Merge remote-tracking branch 'origin/upstream'
Diffstat (limited to 'libc/stdlib/system.c')
-rw-r--r--libc/stdlib/system.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 151a229c6..8c5d25d51 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -18,13 +18,14 @@
#include <sysdep-cancel.h>
#endif
-extern __typeof(system) __libc_system;
-
-/* TODO: the cancellable version breaks on sparc currently,
- * need to figure out why still
- */
-#if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
+#if !defined __UCLIBC_HAS_THREADS_NATIVE__
+/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
+#include <sys/syscall.h>
+#ifndef __NR_vfork
+# define vfork fork
+#endif
+extern __typeof(system) __libc_system;
int __libc_system(const char *command)
{
int wait_val, pid;