2
1

0003-Let-the-configure-script-find-getrpcbynumber-in-libt.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 87f88b28ac01b6449463f00b660fe7416d7f9a55 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sat, 10 Nov 2012 18:53:03 +0100
  4. Subject: [PATCH] Let the configure script find getrpcbynumber in libtirpc
  5. The getrpcbynumber() function may not be available in the C library,
  6. but only in the libtirpc library. Take this into account when checking
  7. for the existence of getrpcbynumber() and getrpcbynumber_r().
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  9. ---
  10. configure.ac | 14 +++++++++++++-
  11. 1 file changed, 13 insertions(+), 1 deletion(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index 8e427e3..6e42c96 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -433,11 +433,23 @@ AC_FUNC_STAT
  17. AC_FUNC_VPRINTF
  18. AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
  19. gethostbyaddr gethostbyname gethostname getmntent \
  20. - getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \
  21. + getnameinfo getrpcbyname getifaddrs \
  22. gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
  23. ppoll realpath rmdir select socket strcasecmp strchr strdup \
  24. strerror strrchr strtol strtoul sigprocmask name_to_handle_at])
  25. +save_CFLAGS=$CFLAGS
  26. +save_LIBS=$LIBS
  27. +CFLAGS="$CFLAGS $AM_CPPFLAGS"
  28. +LIBS="$LIBS $LIBTIRPC"
  29. +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
  30. +CFLAGS=$save_CFLAGS
  31. +LIBS=$save_LIBS
  32. +
  33. +if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
  34. + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
  35. +fi
  36. +
  37. dnl *************************************************************
  38. dnl Check for data sizes
  39. dnl *************************************************************
  40. --
  41. 2.1.0