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)))
        |             ^

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Peter Kjellerstedt 2026-03-19 06:18:43 +01:00 committed by Khem Raj
parent ede40e0d90
commit 82046d3b24
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 55 additions and 0 deletions

View File

@ -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)))

View File

@ -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)

View File

@ -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