coreutils-01-spawn-uclibc.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 71cf16e435bf5db64abcf81a9dc6dc36ce37d58d Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
  3. Date: Tue, 14 Jan 2014 16:59:07 +0000
  4. Subject: [PATCH] spawn: fix link error on uclibc
  5. * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
  6. to incorporate -lrt if needed (on uclibc for example).
  7. * modules/posix_spawn: Reference the substituted LIB.
  8. Patch status: suggested by gnulib maintainer
  9. (http://article.gmane.org/gmane.comp.lib.gnulib.bugs/33610), not in upstream
  10. gnulib yet
  11. This issue should be fixed in coreutils version 8.23.
  12. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  13. ---
  14. diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4
  15. index 87fe122..3eb835c 100644
  16. --- a/m4/spawn_h.m4
  17. +++ b/m4/spawn_h.m4
  18. @@ -64,7 +64,15 @@ AC_DEFUN([gl_HAVE_POSIX_SPAWN],
  19. dnl once only, before all statements that occur in other macros.
  20. AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
  21. - AC_CHECK_FUNCS_ONCE([posix_spawn])
  22. + LIB_POSIX_SPAWN=
  23. + AC_SUBST([LIB_POSIX_SPAWN])
  24. + gl_saved_libs=$LIBS
  25. + AC_SEARCH_LIBS([posix_spawn], [rt],
  26. + [test "$ac_cv_search_posix_spawn" = "none required" ||
  27. + LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn])
  28. + AC_CHECK_FUNCS([posix_spawn])
  29. + LIBS=$gl_saved_libs
  30. +
  31. if test $ac_cv_func_posix_spawn != yes; then
  32. HAVE_POSIX_SPAWN=0
  33. fi
  34. --
  35. 1.7.7.6