[Asterisk-code-review] configure: fix detection of re-entrant resolver functions (asterisk[18])

Friendly Automation asteriskteam at digium.com
Thu Mar 16 10:23:31 CDT 2023


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/19964 )

Change subject: configure: fix detection of re-entrant resolver functions
......................................................................

configure: fix detection of re-entrant resolver functions

uClibc does not provide res_nsearch:
asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'

Patch coded by Yann E. MORIN:
http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html

ASTERISK-21795 #close

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
[Retrieved from:
https: //git.buildroot.net/buildroot/tree/package/asterisk/0005-configure-fix-detection-of-re-entrant-resolver-funct.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Change-Id: I79296f19e28ec764bbd1e991bf11c416d0b10563
---
M configure
M configure.ac
2 files changed, 31 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




diff --git a/configure b/configure
index 62c340a..3459819 100755
--- a/configure
+++ b/configure
@@ -19663,7 +19663,11 @@
 int
 main ()
 {
-int foo = res_ninit(NULL);
+
+				int foo;
+				foo = res_ninit(NULL);
+				foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
+
   ;
   return 0;
 }
diff --git a/configure.ac b/configure.ac
index 5aca252..3231450 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1494,7 +1494,11 @@
 			#include <arpa/nameser.h>
 			#endif
 			#include <resolv.h>],
-			[int foo = res_ninit(NULL);])],
+			[
+				int foo;
+				foo = res_ninit(NULL);
+				foo = res_nsearch(NULL, NULL, 0, 0, NULL, 0);
+			])],
 	AC_MSG_RESULT(yes)
 	AC_DEFINE([HAVE_RES_NINIT], 1, [Define to 1 if your system has the re-entrant resolver functions.])
 	AC_SEARCH_LIBS(res_9_ndestroy, resolv)

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19964
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I79296f19e28ec764bbd1e991bf11c416d0b10563
Gerrit-Change-Number: 19964
Gerrit-PatchSet: 4
Gerrit-Owner: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Gerrit-Reviewer: Bernd Kuhls <bernd.kuhls at t-online.de>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230316/9558fa87/attachment.html>


More information about the asterisk-code-review mailing list