summaryrefslogtreecommitdiff
path: root/toolchain/uclibc/patches/0.9.34-git/0002-Revert-sparc-disable-cancellable-system-as-it-fails-.patch
blob: 57ecffbb20763d5f340c500627215929d3414cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 3422668d945229f9f707aafe24491b5d3e8d7636 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Wed, 20 Aug 2014 04:02:49 +0200
Subject: [PATCH 02/11] Revert "sparc: disable cancellable system, as it fails
 in strange ways right now"

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@uclibc-ng.org>
---
 libc/stdlib/system.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

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;
-- 
1.8.5.2 (Apple Git-48)