From bcf95ecec19feab0d39ab30e066eaa3991b3ffe7 Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Thu, 13 Aug 2026 10:16:47 +0800 Subject: [PATCH] net-libs/ldns: skip definition of _Bool on C99 or newer glibc 2.43 introduced the C23 variadic assert implementation. With _GNU_SOURCE, assert.h declares extern _Bool __assert_single_arg(_Bool) even when compiling in gnu17 mode. ldns later attempts to redefine _Bool for pre-C99 compatibility, causing build failures when compiling in c17 or gnu17 mode with _GNU_SOURCE. Closes: https://bugs.gentoo.org/980828 Signed-off-by: Z. Liu Part-of: https://codeberg.org/gentoo/gentoo/pulls/1661 Merges: https://codeberg.org/gentoo/gentoo/pulls/1661 Signed-off-by: Marc Schiffbauer --- net-libs/ldns/files/ldns-1.9.0-std23-bool.patch | 9 +++++++++ 1 file changed, 9 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 index 264e6f8e47093..be55db9f5e160 100644 --- a/net-libs/ldns/files/ldns-1.9.0-std23-bool.patch +++ b/net-libs/ldns/files/ldns-1.9.0-std23-bool.patch @@ -16,3 +16,12 @@ From: Petr Menšík #ifndef __bool_true_false_are_defined # ifdef HAVE_STDBOOL_H # include +@@ -47,6 +51,8 @@ + # ifndef HAVE__BOOL + # ifdef __cplusplus + typedef bool _Bool; ++# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ++/* _Bool is a built-in keyword since C99; no macro definition needed. */ + # else + # define _Bool signed char + # endif