mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
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 <zhixu.liu@gmail.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/1661 Merges: https://codeberg.org/gentoo/gentoo/pulls/1661 Signed-off-by: Marc Schiffbauer <mschiff@gentoo.org>
This commit is contained in:
@@ -16,3 +16,12 @@ From: Petr Menšík <pemensik@redhat.com>
|
||||
#ifndef __bool_true_false_are_defined
|
||||
# ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user