0002-Revert-sparc-disable-cancellable-system-as-it-fails-.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 3422668d945229f9f707aafe24491b5d3e8d7636 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Wed, 20 Aug 2014 04:02:49 +0200
  4. Subject: [PATCH 02/11] Revert "sparc: disable cancellable system, as it fails
  5. in strange ways right now"
  6. This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3.
  7. It is unclear in which way this is breaking sparc systems.
  8. With this change added you get following linking error:
  9. libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system':
  10. libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel'
  11. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
  12. ---
  13. libc/stdlib/system.c | 13 +++++++------
  14. 1 file changed, 7 insertions(+), 6 deletions(-)
  15. diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
  16. index 151a229..8c5d25d 100644
  17. --- a/libc/stdlib/system.c
  18. +++ b/libc/stdlib/system.c
  19. @@ -18,13 +18,14 @@
  20. #include <sysdep-cancel.h>
  21. #endif
  22. -extern __typeof(system) __libc_system;
  23. -
  24. -/* TODO: the cancellable version breaks on sparc currently,
  25. - * need to figure out why still
  26. - */
  27. -#if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
  28. +#if !defined __UCLIBC_HAS_THREADS_NATIVE__
  29. +/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
  30. +#include <sys/syscall.h>
  31. +#ifndef __NR_vfork
  32. +# define vfork fork
  33. +#endif
  34. +extern __typeof(system) __libc_system;
  35. int __libc_system(const char *command)
  36. {
  37. int wait_val, pid;
  38. --
  39. 1.8.5.2 (Apple Git-48)