adcli/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch
Samuel Cabrero 46b973c3b9 Accepting request 911951 from home:scabrero:branches:network:ldap
- Fix build with glibc 2.34; (bsc#1189080); Add patch
  0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch

OBS-URL: https://build.opensuse.org/request/show/911951
OBS-URL: https://build.opensuse.org/package/show/network:ldap/adcli?expand=0&rev=16
2021-08-25 10:39:26 +00:00

39 lines
1.2 KiB
Diff

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