]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dbus-glib: fix build with gcc-15
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 21 Aug 2025 22:43:07 +0000 (00:43 +0200)
committerSteve Sakoman <steve@sakoman.com>
Tue, 26 Aug 2025 20:10:34 +0000 (13:10 -0700)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/dbus/dbus-glib/fix-build-with-gcc-15.patch [new file with mode: 0644]
meta/recipes-core/dbus/dbus-glib_0.112.bb

diff --git a/meta/recipes-core/dbus/dbus-glib/fix-build-with-gcc-15.patch b/meta/recipes-core/dbus/dbus-glib/fix-build-with-gcc-15.patch
new file mode 100644 (file)
index 0000000..bf3fcd5
--- /dev/null
@@ -0,0 +1,37 @@
+From 8c32bc9fa67513f46199bc31498dc1fecbb611bb Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@collabora.com>
+Date: Thu, 13 Mar 2025 14:19:28 +0000
+Subject: [PATCH] dbus-gvalue: Avoid using the reserved word 'bool'
+
+This is reserved in C23 for the equivalent of `<stdbool.h>`.
+
+Bug-Debian: https://bugs.debian.org/1096507
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+Upstream-Status: Backport [https://gitlab.freedesktop.org/dbus/dbus-glib/-/commit/8c32bc9fa67513f46199bc31498dc1fecbb611bb]
+igned-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ dbus/dbus-gvalue.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/dbus/dbus-gvalue.c b/dbus/dbus-gvalue.c
+index 534e90a..788e360 100644
+--- a/dbus/dbus-gvalue.c
++++ b/dbus/dbus-gvalue.c
+@@ -545,11 +545,11 @@ demarshal_basic (DBusGValueMarshalCtx      *context,
+     {
+     case DBUS_TYPE_BOOLEAN:
+       {
+-      dbus_bool_t bool;
++      dbus_bool_t b;
+         if (!G_VALUE_HOLDS (value, G_TYPE_BOOLEAN))
+           goto invalid_type;
+-      dbus_message_iter_get_basic (iter, &bool);
+-      g_value_set_boolean (value, bool);
++      dbus_message_iter_get_basic (iter, &b);
++      g_value_set_boolean (value, b);
+       return TRUE;
+       }
+     case DBUS_TYPE_BYTE:
+-- 
+GitLab
+
index 4acf43569420f8edb1a3052855e8401b036b1ea9..7312897dd3c3621b26f5362b08ec73c329e2b665 100644 (file)
@@ -13,6 +13,7 @@ DEPENDS:class-native = "glib-2.0-native dbus-native"
 SRC_URI = "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
            file://no-examples.patch \
            file://test-install-makefile.patch \
+           file://fix-build-with-gcc-15.patch \
 "
 SRC_URI[md5sum] = "021e6c8a288df02c227e4aafbf7e7527"
 SRC_URI[sha256sum] = "7d550dccdfcd286e33895501829ed971eeb65c614e73aadb4a08aeef719b143a"