revert-vfork.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. diff -Nur uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/common/vfork.c uClibc-0.9.32-rc1/libc/sysdeps/linux/common/vfork.c
  2. --- uClibc-0.9.32-rc1.orig/libc/sysdeps/linux/common/vfork.c 2010-12-17 20:05:17.000000000 +0100
  3. +++ uClibc-0.9.32-rc1/libc/sysdeps/linux/common/vfork.c 2010-12-31 14:28:19.259431750 +0100
  4. @@ -4,30 +4,24 @@
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. +/* Trivial implementation for arches that lack vfork */
  8. #include <unistd.h>
  9. #include <sys/types.h>
  10. #include <sys/syscall.h>
  11. -extern __typeof(vfork) __vfork attribute_hidden;
  12. -
  13. -#ifdef __NR_vfork
  14. -
  15. -# define __NR___vfork __NR_vfork
  16. -_syscall0(pid_t, __vfork)
  17. -
  18. -weak_alias(__vfork,vfork)
  19. -libc_hidden_weak(vfork)
  20. -
  21. -#elif defined __ARCH_USE_MMU__ && defined __NR_fork
  22. +#ifdef __ARCH_USE_MMU__
  23. -/* Trivial implementation for arches that lack vfork */
  24. +#ifdef __NR_fork
  25. +/* libc_hidden_proto(fork) */
  26. +extern __typeof(vfork) __vfork attribute_hidden;
  27. pid_t __vfork(void)
  28. {
  29. return fork();
  30. }
  31. -
  32. +/* libc_hidden_proto(vfork) */
  33. weak_alias(__vfork,vfork)
  34. libc_hidden_weak(vfork)
  35. +#endif
  36. #endif