Blame SOURCES/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch

69a8fd
From e841ba7513f3f8b6393183d2dea9adcbf7ba2e44 Mon Sep 17 00:00:00 2001
69a8fd
From: Sumit Bose <sbose@redhat.com>
69a8fd
Date: Wed, 28 Jul 2021 12:55:16 +0200
69a8fd
Subject: [PATCH] configure: check for ns_get16 and ns_get32 as well
69a8fd
69a8fd
With newer versions of glibc res_query() might ba already available in
69a8fd
glibc with ns_get16() and ns_get32() still requires libresolv.
69a8fd
69a8fd
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984891
69a8fd
---
69a8fd
 configure.ac | 6 ++++--
69a8fd
 1 file changed, 4 insertions(+), 2 deletions(-)
69a8fd
69a8fd
diff --git a/configure.ac b/configure.ac
69a8fd
index c6ff31d..fc6e790 100644
69a8fd
--- a/configure.ac
69a8fd
+++ b/configure.ac
69a8fd
@@ -98,13 +98,15 @@ AC_SUBST(LDAP_CFLAGS)
69a8fd
 # -------------------------------------------------------------------
69a8fd
 # resolv
69a8fd
 
69a8fd
-AC_MSG_CHECKING(for which library has res_query)
69a8fd
+AC_MSG_CHECKING([for which library has res_query, ns_get16 and ns_get32])
69a8fd
 for lib in "" "-lresolv"; do
69a8fd
 	saved_LIBS="$LIBS"
69a8fd
 	LIBS="$LIBS $lib"
69a8fd
 	AC_LINK_IFELSE([
69a8fd
 		AC_LANG_PROGRAM([#include <resolv.h>],
69a8fd
-		                [res_query (0, 0, 0, 0, 0)])
69a8fd
+		                [res_query (0, 0, 0, 0, 0);
69a8fd
+		                 ns_get32 (NULL);
69a8fd
+		                 ns_get16 (NULL);])
69a8fd
 	],
69a8fd
 	[ AC_MSG_RESULT(${lib:-libc}); have_res_query="yes"; break; ],
69a8fd
 	[ LIBS="$saved_LIBS" ])
69a8fd
-- 
69a8fd
2.31.1
69a8fd