diff --git a/packages/devel/pkg-config/patches/0002-Do-not-use-bool-as-a-field-name.patch b/packages/devel/pkg-config/patches/0002-Do-not-use-bool-as-a-field-name.patch new file mode 100644 index 0000000000..bcb7e94d69 --- /dev/null +++ b/packages/devel/pkg-config/patches/0002-Do-not-use-bool-as-a-field-name.patch @@ -0,0 +1,36 @@ +From b3b26a7e125e5e4f5b69975cc17eb6d33198ebaa Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Thu, 11 Apr 2024 14:40:21 +0100 +Subject: [PATCH] Do not use bool as a field name + +C99 aliases `bool` to `_Bool`, and C23 introduces `bool` as a reserved +keyword. Let's avoid using `bool` as a field name. + +Upstream-Status: Backport [Backport from glib to bunlded version in pkg-config https://github.com/GNOME/glib/commit/9e320e1c43a4770ed1532248fe5416eb0c618120] +Signed-off-by: Martin Jansa +--- + glib/glib/goption.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/glib/glib/goption.c b/glib/glib/goption.c +index 0a22f6f..f439fd4 100644 +--- a/glib/glib/goption.c ++++ b/glib/glib/goption.c +@@ -166,7 +166,7 @@ typedef struct + gpointer arg_data; + union + { +- gboolean bool; ++ gboolean boolean; + gint integer; + gchar *str; + gchar **array; +@@ -1600,7 +1600,7 @@ free_changes_list (GOptionContext *context, + switch (change->arg_type) + { + case G_OPTION_ARG_NONE: +- *(gboolean *)change->arg_data = change->prev.bool; ++ *(gboolean *)change->arg_data = change->prev.boolean; + break; + case G_OPTION_ARG_INT: + *(gint *)change->arg_data = change->prev.integer;