Skip to contentSkip to conversation

pipewire: Backport two patches to build with glibc 2.43

PATCH New Peter Kjellerstedt 1 participant 1 message Mar 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pipewire: Backport two patches to build with glibc 2.43

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)))
        |             ^
---
 ...-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
meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-spa-plugins-alsa-acp-compat.h-Fix-missed-Wdiscarded-.patch new file +28 -0
new file mode 100644
index 0000000000..6ded1c15f8
@@ -0,0 +1,28 @@
+From c847b8162959c29b783585e0dcadbfb096e7cb73 Mon Sep 17 00:00:00 2001
+From: Ripley Tom <[email protected]>
+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 <[email protected]>
+---
+ 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)))
meta-multimedia/recipes-multimedia/pipewire/pipewire/0002-spa-plugins-alsa-acp-compat.h-p-is-already-const-do-.patch new file +25 -0
new file mode 100644
index 0000000000..d6fc5866ec
@@ -0,0 +1,25 @@
+From 1a37f445a20e67976c83360ab5830887fffe37e2 Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <[email protected]>
+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 <[email protected]>
+---
+ 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)
meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.2.bb +2 -0
index 14e467fa33..6914a4a0ad 100644
@@ -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