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