0005-configure-fix-detection-of-re-entrant-resolver-funct.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 9b4070944578336506cd0a76de6f733c72d0ca74 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Sat, 13 Oct 2018 11:11:15 +0200
  4. Subject: [PATCH] configure: fix detection of re-entrant resolver functions
  5. Fixes https://issues.asterisk.org/jira/browse/ASTERISK-21795
  6. uClibc does not provide res_nsearch:
  7. asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'
  8. Patch coded by Yann E. MORIN:
  9. http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html
  10. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  11. ---
  12. configure.ac | 6 +++++-
  13. 1 file changed, 5 insertions(+), 1 deletion(-)
  14. diff --git a/configure.ac b/configure.ac
  15. index dd0c8edd13..ee1ca9ceb6 100644
  16. --- a/configure.ac
  17. +++ b/configure.ac
  18. @@ -1388,7 +1388,11 @@ AC_LINK_IFELSE(
  19. #include <arpa/nameser.h>
  20. #endif
  21. #include <resolv.h>],
  22. - [int foo = res_ninit(NULL);])],
  23. + [
  24. + int foo;
  25. + foo = res_ninit(NULL);
  26. + foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
  27. + ])],
  28. AC_MSG_RESULT(yes)
  29. AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
  30. AC_SEARCH_LIBS(res_9_ndestroy, resolv)
  31. --
  32. 2.19.1