Add ns_get16() and ns_get32() to configure check

Resolves: rhbz#1984892
This commit is contained in:
Sumit Bose 2021-07-28 21:07:58 +02:00
parent 972019be33
commit bcd888789b
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,38 @@
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.31.1

View File

@ -1,6 +1,6 @@
Name: adcli
Version: 0.9.1
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Active Directory enrollment
License: LGPLv2+
URL: https://gitlab.freedesktop.org/realmd/adcli
@ -25,6 +25,9 @@ Patch8: 0003-entry-add-passwd-user-sub-command.patch
Patch9: 0004-Add-setattr-option.patch
Patch10: 0005-Add-delattr-option.patch
# rhbz#1984892 - adcli: FTBFS because of libresolv changes in glibc 2.34
Patch11: 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch
BuildRequires: gcc
BuildRequires: intltool pkgconfig
BuildRequires: libtool
@ -88,6 +91,10 @@ documentation.
%doc %{_datadir}/doc/adcli/*
%changelog
* Wed Jul 28 2021 Sumit Bose <sbose@redhat.com> - 0.9.1-6
- Add ns_get16() and ns_get32() to configure check
Resolves: rhbz#1984892
* Wed Jun 30 2021 Sumit Bose <sbose@redhat.com> - 0.9.1-5
- Sync with upstream/Fedora/RHEL-8.5
Resolves: rhbz#1977168, rhbz#1977167, rhbz#1977165