diff --git a/bind-dyndb-ldap-fix-clang-atomic.patch b/bind-dyndb-ldap-fix-clang-atomic.patch new file mode 100644 index 0000000000000000000000000000000000000000..a5408fff0574ce6d556a2b1e476506662028fa25 --- /dev/null +++ b/bind-dyndb-ldap-fix-clang-atomic.patch @@ -0,0 +1,69 @@ +From 1216b4dc222ac584822128bf89bbcee1c1c6dc61 Mon Sep 17 00:00:00 2001 +From: hleft +Date: Tue, 31 Oct 2023 08:39:39 +0800 +Subject: [PATCH] fix clang build error: _Atomic + +error: address argument to atomic operation must be a pointer to _Atomic type ('isc_refcount_t *' (aka 'unsigned long *') invalid) + +--- + src/ldap_driver.c | 2 +- + src/ldap_helper.c | 2 +- + src/mldap.c | 2 +- + src/syncrepl.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/ldap_driver.c b/src/ldap_driver.c +index e4aeeb2..3a6618b 100644 +--- a/src/ldap_driver.c ++++ b/src/ldap_driver.c +@@ -69,7 +69,7 @@ ldapdb_associate(isc_mem_t *mctx, node_name_t *name, dns_dbtype_t type, + + struct ldapdb { + dns_db_t common; +- isc_refcount_t refs; ++ _Atomic isc_refcount_t refs; + ldap_instance_t *ldap_inst; + + /** +diff --git a/src/ldap_helper.c b/src/ldap_helper.c +index acabd31..c765ce6 100644 +--- a/src/ldap_helper.c ++++ b/src/ldap_helper.c +@@ -166,7 +166,7 @@ struct ldap_instance { + isc_thread_t watcher; + bool exiting; + /* Non-zero if this instance is 'tainted' by an unrecoverable problem. */ +- isc_refcount_t errors; ++ _Atomic isc_refcount_t errors; + + /* Settings. */ + settings_set_t *local_settings; +diff --git a/src/mldap.c b/src/mldap.c +index 0bc2d33..2e1fe4f 100644 +--- a/src/mldap.c ++++ b/src/mldap.c +@@ -65,7 +65,7 @@ static dns_name_t uuid_rootname = + struct mldapdb { + isc_mem_t *mctx; + metadb_t *mdb; +- isc_refcount_t generation; ++ _Atomic isc_refcount_t generation; + }; + + +diff --git a/src/syncrepl.c b/src/syncrepl.c +index f94379c..ced2491 100644 +--- a/src/syncrepl.c ++++ b/src/syncrepl.c +@@ -87,7 +87,7 @@ static const isc_interval_t shutdown_timeout = { 3, 0 }; + * @see ldap_sync_search_entry() + */ + struct sync_ctx { +- isc_refcount_t task_cnt; /**< provides atomic access */ ++ _Atomic isc_refcount_t task_cnt; /**< provides atomic access */ + isc_mem_t *mctx; + /** limit number of unprocessed LDAP events in queue + * (memory consumption is one of problems) */ +-- +2.42.0 + diff --git a/bind-dyndb-ldap.spec b/bind-dyndb-ldap.spec index d001e0d45c31fb8a9082902341f82b42eb80d6aa..9277a346e2c5945f367fb33c04a589c86e5e03aa 100644 --- a/bind-dyndb-ldap.spec +++ b/bind-dyndb-ldap.spec @@ -5,7 +5,7 @@ Name: bind-dyndb-ldap Version: 11.10 -Release: 3 +Release: 4 Summary: LDAP back-end plug-in for BIND License: GPLv2+ URL: https://releases.pagure.org/bind-dyndb-ldap @@ -20,6 +20,9 @@ Patch5: backport-bind-dyndb-ldap-11.10-bind-9.18.13.patch Patch6: backport-bind-dyndb-ldap-11.10-bind-9.18.19.patch Patch7: backport-bind-dyndb-ldap-11.10-dns_name_init.patch Patch8: backport-bind-dyndb-ldap-bind-9.18.24.patch +%if "%toolchain" == "clang" +Patch9000: bind-dyndb-ldap-fix-clang-atomic.patch +%endif BuildRequires: bind-devel >= %{bind_version} BuildRequires: krb5-devel @@ -28,7 +31,7 @@ BuildRequires: libuuid-devel BuildRequires: automake, autoconf, libtool, make BuildRequires: openssl-devel BuildRequires: autoconf-archive - +BuildRequires: libbpf-devel %if %{with_bind_pkcs11} BuildRequires: bind-pkcs11-devel >= %{bind_version} Requires(pre): bind-pkcs11 >= %{bind_version} @@ -55,7 +58,8 @@ export BIND9_CFLAGS='-I /usr/include/bind9 -DHAVE_TLS -DHAVE_THREAD_LOCAL' # unset SOURCE_DATE_EPOCH eliminate bep differences unset SOURCE_DATE_EPOCH %make_build -set SOURCE_DATE_EPOCH +# set SOURCE_DATE_EPOCH +export SOURCE_DATE_EPOCH=$(date +%s) %endif %install @@ -101,6 +105,10 @@ sed -i.bak -e "$SEDSCRIPT" /etc/named.conf %changelog +* Fri Mar 22 2024 yoo - 11.10-4 +- fix clang build error: Atomic +- Signed-off-by: shafeipaozi + * Wed Mar 20 2024 xinghe - 11.10-3 - Type:bugfix - CVE:NA