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

Sean Bright asteriskteam at digium.com
Thu Mar 9 16:10:36 CST 2023


Attention is currently required from: Bernd Kuhls, Fabrice Fontaine.

Hello Bernd Kuhls, Fabrice Fontaine,

I'd like you to do a code review.
Please visit

    https://gerrit.asterisk.org/c/asterisk/+/19966

to review the following change.


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/19966/1

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: 1
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-Attention: Bernd Kuhls <bernd.kuhls at t-online.de>
Gerrit-Attention: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230309/218ab874/attachment-0001.html>


More information about the asterisk-code-review mailing list