commit:     6ff7f81a2cfcd891097e4855419064181ea8bcd2
Author:     Brett A C Sheffield <bacs <AT> librecast <DOT> net>
AuthorDate: Sun Mar  1 11:18:22 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar  1 17:42:47 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ff7f81a

net-libs/ldns: Skip definition of bool on -std=c23 or newer

sys-libs/glibc >= 2.43 installs the new C23 /usr/include/assert.h which
defines a conflicting __assert_single_arg of type _Bool.

Apply patch from Fedora to fix this when --std=c23 or newer.

Closes: https://bugs.gentoo.org/970613
Signed-off-by: Brett A C Sheffield <bacs <AT> librecast.net>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/186
Merges: https://codeberg.org/gentoo/gentoo/pulls/186
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/ldns/files/ldns-1.9.0-std23-bool.patch | 18 ++++++++++++++++++
 net-libs/ldns/ldns-1.9.0.ebuild                 |  1 +
 2 files changed, 19 insertions(+)

diff --git a/net-libs/ldns/files/ldns-1.9.0-std23-bool.patch 
b/net-libs/ldns/files/ldns-1.9.0-std23-bool.patch
new file mode 100644
index 000000000000..264e6f8e4709
--- /dev/null
+++ b/net-libs/ldns/files/ldns-1.9.0-std23-bool.patch
@@ -0,0 +1,18 @@
+Skip definition of bool on -std=c23 or newer
+https://bugs.gentoo.org/970613
+https://src.fedoraproject.org/rpms/ldns/blob/ee1ebc36cd4e1fdc81b9c43f1107c02e0cceb74e/f/ldns-1.9-std23-bool.patch
+From: Petr Menšík <[email protected]>
+
+--- a/ldns/common.h.in
++++ b/ldns/common.h.in
+@@ -40,6 +40,10 @@
+  */
+ /*@ignore@*/
+ /* splint barfs on this construct */
++#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
++/* c23 defines bool already and deprecates stdbool.h */
++#define __bool_true_false_are_defined
++#endif
+ #ifndef __bool_true_false_are_defined
+ # ifdef HAVE_STDBOOL_H
+ #  include <stdbool.h>

diff --git a/net-libs/ldns/ldns-1.9.0.ebuild b/net-libs/ldns/ldns-1.9.0.ebuild
index 6238af780b78..0a65be9a60d0 100644
--- a/net-libs/ldns/ldns-1.9.0.ebuild
+++ b/net-libs/ldns/ldns-1.9.0.ebuild
@@ -45,6 +45,7 @@ MULTILIB_CHOST_TOOLS=(
 
 PATCHES=(
        "${FILESDIR}/ldns-1.8.1-pkgconfig.patch"
+       "${FILESDIR}/ldns-1.9.0-std23-bool.patch" # 970613
 )
 
 pkg_setup() {

Reply via email to