diff mbox

[v2,02/12] Revert "sparc: disable cancellable system, as it fails in strange ways right now"

Message ID 1409221890-2516-2-git-send-email-wbx@openadk.org
State Accepted
Commit 789fca90bff0b0bcd658444cea6afd4cdb43dc5d
Headers show

Commit Message

Waldemar Brodkorb Aug. 28, 2014, 10:31 a.m. UTC
This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.

It is unclear in which way this is breaking sparc systems.
With this change added you get following linking error:
libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 libc/stdlib/system.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Bernhard Reutner-Fischer Aug. 28, 2014, 10:39 a.m. UTC | #1
On Thu, Aug 28, 2014 at 12:31:20PM +0200, Waldemar Brodkorb wrote:
> This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.
> 
> It is unclear in which way this is breaking sparc systems.
> With this change added you get following linking error:
> libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
> libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'

Applied, thanks!
diff mbox

Patch

diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 151a229..8c5d25d 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;