diff mbox series

[meta-gnome,26/29] gthumb: Include stdbool.h for bool

Message ID 20261023065350.3228996-26-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,01/29] castxml: upgrade 0.7.0 -> 0.8.0 | expand

Commit Message

Khem Raj Oct. 23, 2026, 6:53 a.m. UTC
src/lib/util.h uses bool without including stdbool.h, which fails to
build where no other header pulls it in, e.g. with clang on riscv32
musl:

  src/lib/util.h:68:1: error: unknown type name 'bool'

Add a patch that includes it.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 ...01-util.h-Include-stdbool.h-for-bool.patch | 29 +++++++++++++++++++
 meta-gnome/recipes-gnome/gthumb/gthumb_4.0.bb |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/gthumb/gthumb/0001-util.h-Include-stdbool.h-for-bool.patch
diff mbox series

Patch

diff --git a/meta-gnome/recipes-gnome/gthumb/gthumb/0001-util.h-Include-stdbool.h-for-bool.patch b/meta-gnome/recipes-gnome/gthumb/gthumb/0001-util.h-Include-stdbool.h-for-bool.patch
new file mode 100644
index 0000000000..8b5c9d8474
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gthumb/gthumb/0001-util.h-Include-stdbool.h-for-bool.patch
@@ -0,0 +1,29 @@ 
+From: Khem Raj <khem.raj@oss.qualcomm.com>
+Date: Thu, 22 Oct 2026 19:00:00 -0700
+Subject: [PATCH] util.h: Include stdbool.h for bool
+
+util.h declares _g_parse_exif_date() returning bool, but relies on
+another header to include stdbool.h. Before C23, bool is not a keyword,
+so where none of them does, e.g. with clang and musl on riscv32, the
+build fails:
+
+  src/lib/util.h:68:1: error: unknown type name 'bool'
+
+Include stdbool.h directly.
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gthumb/-/merge_requests/64]
+Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
+---
+ src/lib/util.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/lib/util.h
++++ b/src/lib/util.h
+@@ -2,6 +2,7 @@
+ #define LIB_UTIL_H
+
+ #include <math.h>
++#include <stdbool.h>
+ #include <glib.h>
+ #include <glib/gi18n-lib.h>
+ #include <gio/gio.h>
diff --git a/meta-gnome/recipes-gnome/gthumb/gthumb_4.0.bb b/meta-gnome/recipes-gnome/gthumb/gthumb_4.0.bb
index f534d5f1f4..c3340551aa 100644
--- a/meta-gnome/recipes-gnome/gthumb/gthumb_4.0.bb
+++ b/meta-gnome/recipes-gnome/gthumb/gthumb_4.0.bb
@@ -33,6 +33,7 @@  inherit gnomebase gsettings gtk-icon-cache mime-xdg vala features_check

 REQUIRED_DISTRO_FEATURES = "opengl"

+SRC_URI += "file://0001-util.h-Include-stdbool.h-for-bool.patch"
 SRC_URI[archive.sha256sum] = "a24aaa72b5637f49097dedc9c141a33615da770d029315f3285ebf2156cf7b61"

 FILES:${PN} += "${datadir}/metainfo"