diff mbox series

[meta-multimedia] pipewire: Backport two patches to build with glibc 2.43

Message ID 20260319051843.2243601-1-pkj@axis.com
State Under Review
Headers show
Series [meta-multimedia] pipewire: Backport two patches to build with glibc 2.43 | expand

Commit Message

Peter Kjellerstedt March 19, 2026, 5:18 a.m. UTC
This avoids the following error:

  In file included from spa/plugins/alsa/acp/compat.c:26:
  spa/plugins/alsa/acp/compat.h: In function 'pa_path_get_filename':
  spa/plugins/alsa/acp/compat.h:437:13: error: assignment discards
  'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
    437 |     if ((fn = strrchr(p, PA_PATH_SEP_CHAR)))
        |             ^

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 ...-acp-compat.h-Fix-missed-Wdiscarded-.patch | 28 +++++++++++++++++++
 ...-acp-compat.h-p-is-already-const-do-.patch | 25 +++++++++++++++++
 .../pipewire/pipewire_1.6.2.bb                |  2 ++
 3 files changed, 55 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch
 create mode 100644 meta-multimedia/recipes-multimedia/pipewire/pipewire/0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch
diff mbox series

Patch

diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch
new file mode 100644
index 0000000000..6ded1c15f8
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch
@@ -0,0 +1,28 @@ 
+From c847b8162959c29b783585e0dcadbfb096e7cb73 Mon Sep 17 00:00:00 2001
+From: Ripley Tom <discofan420@protonmail.com>
+Date: Sat, 21 Feb 2026 19:33:11 +0100
+Subject: [PATCH] spa/plugins/alsa/acp/compat.h: Fix missed
+ -Wdiscarded-qualifiers warning
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/c847b8162959c29b783585e0dcadbfb096e7cb73]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ spa/plugins/alsa/acp/compat.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/spa/plugins/alsa/acp/compat.h b/spa/plugins/alsa/acp/compat.h
+index f7592e1a6..0f7b959df 100644
+--- a/spa/plugins/alsa/acp/compat.h
++++ b/spa/plugins/alsa/acp/compat.h
+@@ -429,9 +429,9 @@ static PA_PRINTF_FUNC(1,0) inline char *pa_vsprintf_malloc(const char *fmt, va_l
+ 
+ #define pa_fopen_cloexec(f,m)	fopen(f,m"e")
+ 
+-static inline char *pa_path_get_filename(const char *p)
++static inline const char *pa_path_get_filename(const char *p)
+ {
+-    char *fn;
++    const char *fn;
+     if (!p)
+         return NULL;
+     if ((fn = strrchr(p, PA_PATH_SEP_CHAR)))
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire/0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch
new file mode 100644
index 0000000000..d6fc5866ec
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch
@@ -0,0 +1,25 @@ 
+From 1a37f445a20e67976c83360ab5830887fffe37e2 Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+Date: Tue, 17 Mar 2026 03:17:15 +1100
+Subject: [PATCH] spa/plugins/alsa/acp/compat.h: p is already const do not
+ recast
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1a37f445a20e67976c83360ab5830887fffe37e2]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ spa/plugins/alsa/acp/compat.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spa/plugins/alsa/acp/compat.h b/spa/plugins/alsa/acp/compat.h
+index 0f7b959df..87151d197 100644
+--- a/spa/plugins/alsa/acp/compat.h
++++ b/spa/plugins/alsa/acp/compat.h
+@@ -436,7 +436,7 @@ static inline const char *pa_path_get_filename(const char *p)
+         return NULL;
+     if ((fn = strrchr(p, PA_PATH_SEP_CHAR)))
+         return fn+1;
+-    return (char*) p;
++    return p;
+ }
+ 
+ static inline bool pa_is_path_absolute(const char *fn)
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.2.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.2.bb
index 14e467fa33..6914a4a0ad 100644
--- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.2.bb
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.2.bb
@@ -15,6 +15,8 @@  DEPENDS = "dbus ncurses"
 SRCREV = "95da54a482b68475958bbc3fa572a9c20df0df74"
 BRANCH = "${@oe.utils.trim_version('${PV}', 2)}"
 SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=${BRANCH};protocol=https;tag=${PV}"
+SRC_URI += "file://0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch"
+SRC_URI += "file://0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch"
 
 inherit meson pkgconfig systemd gettext useradd