]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
libsdl2: fix build with pipewire 1.4.0
authorMarkus Volk <f_l_k@t-online.de>
Sun, 9 Mar 2025 06:56:27 +0000 (07:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 13 Mar 2025 10:39:42 +0000 (10:39 +0000)
This commit adds a backport patch to address a build issue with pipewire 1.4.0

| /home/flk/poky/build/tmp/work/corei7-64-poky-linux/libsdl2/2.32.2/SDL2-2.32.2/src/audio/pipewire/SDL_pipewire.c:593:37: error: passing argument 1 of 'pw_node_enum_params' from incompatible pointer type [-Wincompatible-pointer-types]

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/libsdl2/libsdl2/9e079fe9c7931738ed63d257b1d7fb8a07b66824.patch [new file with mode: 0644]
meta/recipes-graphics/libsdl2/libsdl2_2.32.2.bb

diff --git a/meta/recipes-graphics/libsdl2/libsdl2/9e079fe9c7931738ed63d257b1d7fb8a07b66824.patch b/meta/recipes-graphics/libsdl2/libsdl2/9e079fe9c7931738ed63d257b1d7fb8a07b66824.patch
new file mode 100644 (file)
index 0000000..f8c0598
--- /dev/null
@@ -0,0 +1,35 @@
+From 9e079fe9c7931738ed63d257b1d7fb8a07b66824 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <neal@gompa.dev>
+Date: Mon, 10 Feb 2025 05:00:56 -0500
+Subject: [PATCH] pipewire: Ensure that the correct struct is used for
+ enumeration APIs
+
+PipeWire now requires the correct struct type is used, otherwise
+it will fail to compile.
+
+Reference: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/188d920733f0791413d3386e5536ee7377f71b2f
+
+Fixes: https://github.com/libsdl-org/SDL/issues/12224
+(cherry picked from commit d35bef64e913dd7d5dd3153a4b61f10ef837dad6)
+(cherry picked from commit 6be87ceb33a9aad3bf5204bb13b3a5e8b498fd26)
+
+Upstream-Status: Backport [https://github.com/libsdl-org/SDL/commit/9e079fe9c7931738ed63d257b1d7fb8a07b66824]
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ src/audio/pipewire/SDL_pipewire.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c
+index 889e05decb293..5d1bfc28dedb7 100644
+--- a/src/audio/pipewire/SDL_pipewire.c
++++ b/src/audio/pipewire/SDL_pipewire.c
+@@ -590,7 +590,7 @@ static void node_event_info(void *object, const struct pw_node_info *info)
+         /* Need to parse the parameters to get the sample rate */
+         for (i = 0; i < info->n_params; ++i) {
+-            pw_node_enum_params(node->proxy, 0, info->params[i].id, 0, 0, NULL);
++            pw_node_enum_params((struct pw_node*)node->proxy, 0, info->params[i].id, 0, 0, NULL);
+         }
+         hotplug_core_sync(node);
index 2b28b3dfa9941414c69262e05530f5ad5be909a5..d075b335f5df6535a7a7e8821bf39f537602440b 100644 (file)
@@ -22,6 +22,7 @@ LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'f
 PROVIDES = "virtual/libsdl2"
 
 SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz"
+SRC_URI += "file://9e079fe9c7931738ed63d257b1d7fb8a07b66824.patch"
 
 S = "${WORKDIR}/SDL2-${PV}"