at-spi2-core: backport a patch to fix build with gcc-14 on host
PATCH 1/1 at-spi2-core: backport a patch to fix build with gcc-14 on host
* fixes:
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c: In function ?atspi_device_listener_new_simple?:
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c:252:37: error: passing argument 1 of ?atspi_device_listener_new? from incompatible pointer type [-Wincompatible-pointer-types]
| 252 | return atspi_device_listener_new (device_remove_datum, callback, callback_destroyed);
| | ^~~~~~~~~~~~~~~~~~~
| | |
| | gboolean (*)(const AtspiDeviceEvent *, void *) {aka int (*)(const struct _AtspiDeviceEvent *, void *)}
| ../at-spi2-core-2.42.0/atspi/atspi-device-listener.c:222:50: note: expected ?AtspiDeviceListenerCB? {aka ?int (*)(struct _AtspiDeviceEvent *, void *)?} but argument is of type ?gboolean (*)(const AtspiDeviceEvent *, void *)? {aka ?int (*)(const struct _AtspiDeviceEvent *, void *)?}
| 222 | atspi_device_listener_new (AtspiDeviceListenerCB callback,
| | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~Signed-off-by Martin Jansa <[email protected]>
--- .../0001-Fix-function-prototype.patch | 27 +++++++++++++++++++ .../atk/at-spi2-core_2.42.0.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-support/atk/at-spi2-core/0001-Fix-function-prototype.patch
meta/recipes-support/atk/at-spi2-core/0001-Fix-function-prototype.patch new file +27 -0
@@ -0,0 +1,27 @@ +From b29826379068a05cdd42ba6e956d17e4d6681c7b Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero <[email protected]> +Date: Tue, 23 Nov 2021 11:18:51 -0600 +Subject: [PATCH] Fix function prototype + +device_remove_datum already implicitly casts its cb to a +AtspiDeviceListenerSimpleCB, which takes a const *event. + +Signed-off-by: Martin Jansa <[email protected]> +Upstream-Status: Backport [v2.43.92 https://github.com/GNOME/at-spi2-core/commit/1e91fc4cff2080696be914e26f4cdf0bf32d1550] +--- + atspi/atspi-device-listener.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c +index 69f77d1..9776ebd 100644 +--- a/atspi/atspi-device-listener.c ++++ b/atspi/atspi-device-listener.c +@@ -53,7 +53,7 @@ device_event_handler_new (AtspiDeviceListenerCB callback, + } + + static gboolean +-device_remove_datum (const AtspiDeviceEvent *event, void *user_data) ++device_remove_datum (AtspiDeviceEvent *event, void *user_data) + { + AtspiDeviceListenerSimpleCB cb = user_data; + return cb (event);
meta/recipes-support/atk/at-spi2-core_2.42.0.bb +1 -0
@@ -11,6 +11,7 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://0001-Ensure-x11_dep-is-defined.patch \ + file://0001-Fix-function-prototype.patch \ " SRC_URI[sha256sum] = "4b5da10e94fa3c6195f95222438f63a0234b99ef9df772c7640e82baeaa6e386"
Signature · 1 line
2.47.0