diff --git a/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch b/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch new file mode 100644 index 0000000..22f8a6a --- /dev/null +++ b/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch @@ -0,0 +1,38 @@ +From e841ba7513f3f8b6393183d2dea9adcbf7ba2e44 Mon Sep 17 00:00:00 2001 +From: Sumit Bose +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 ], +- [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 + diff --git a/adcli.spec b/adcli.spec index cce5849..575de28 100644 --- a/adcli.spec +++ b/adcli.spec @@ -1,6 +1,6 @@ Name: adcli Version: 0.9.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Active Directory enrollment License: LGPLv2+ URL: https://gitlab.freedesktop.org/realmd/adcli @@ -16,6 +16,7 @@ Patch7: 0002-adcli_entry-add-entry_attrs-with-userAccountControl-.patch Patch8: 0003-entry-add-passwd-user-sub-command.patch Patch9: 0004-Add-setattr-option.patch Patch10: 0005-Add-delattr-option.patch +Patch11: 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch BuildRequires: gcc @@ -81,6 +82,10 @@ documentation. %doc %{_datadir}/doc/adcli/* %changelog +* Wed Jul 28 2021 Sumit Bose - 0.9.1-9 +- Add ns_get16() and ns_get32() to configure check + Resolves: rhbz#1984891 + * Wed Jul 21 2021 Fedora Release Engineering - 0.9.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild