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

Friendly Automation asteriskteam at digium.com
Thu Mar 16 10:20:21 CDT 2023


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

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 e155e24..2d32e1c 100755
--- a/configure
+++ b/configure
@@ -19270,7 +19270,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 a4c4ce2..45d0589 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1485,7 +1485,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/+/19966
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I79296f19e28ec764bbd1e991bf11c416d0b10563
Gerrit-Change-Number: 19966
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Bernd Kuhls <bernd.kuhls at t-online.de>
Gerrit-Reviewer: Fabrice Fontaine <fontaine.fabrice at gmail.com>
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/2a221dbf/attachment-0001.html>


More information about the asterisk-code-review mailing list