diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2026-03-06 10:52:06 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2026-03-17 13:25:12 -0700 |
| commit | e8be5452b634a7fd63486fcdc6dab9d70a8ee1ac (patch) | |
| tree | a4ec9d08da618b436e765d0fd0f27445077b56f8 /meta-multimedia | |
| parent | 0541742ec0c85acb1fc07c85cbb8e01e61af18be (diff) | |
| download | meta-openembedded-e8be5452b634a7fd63486fcdc6dab9d70a8ee1ac.tar.gz | |
pipewire: backport fix for build with glibc-2.43
Fixes:
../sources/pipewire-1.6.0/spa/plugins/support/logger.c:121:5: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
121 | s = strrchr(file, '/');
| ^ ~~~~~~~~~~~~~~~~~~
1 error generated.
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia')
| -rw-r--r-- | meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-treewide-fix-some-Wdiscarded-qualifiers.patch | 89 | ||||
| -rw-r--r-- | meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.0.bb | 5 |
2 files changed, 92 insertions, 2 deletions
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-treewide-fix-some-Wdiscarded-qualifiers.patch b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-treewide-fix-some-Wdiscarded-qualifiers.patch new file mode 100644 index 0000000000..e8e677910b --- /dev/null +++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire/0001-treewide-fix-some-Wdiscarded-qualifiers.patch | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | From fa64e2873682180eae5ce5bd02298fa6739cf005 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= <pobrn@protonmail.com> | ||
| 3 | Date: Thu, 19 Feb 2026 20:56:36 +0100 | ||
| 4 | Subject: [PATCH] treewide: fix some `-Wdiscarded-qualifiers` | ||
| 5 | |||
| 6 | Newer glibc versions have made certain `str*()` functions into macros | ||
| 7 | that ensure that the const-ness of the argument is propagated to the | ||
| 8 | return type. | ||
| 9 | |||
| 10 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 11 | Upstream-Status: Backport [https://github.com/PipeWire/pipewire/commit/e46bfe67b60458e444ee2495209144b49e97d2f1] | ||
| 12 | --- | ||
| 13 | pipewire-jack/src/pipewire-jack.c | 2 +- | ||
| 14 | spa/plugins/bluez5/bluez5-dbus.c | 7 ++----- | ||
| 15 | spa/plugins/support/logger.c | 4 ++-- | ||
| 16 | 3 files changed, 5 insertions(+), 8 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c | ||
| 19 | index 1bef74283..73627a67e 100644 | ||
| 20 | --- a/pipewire-jack/src/pipewire-jack.c | ||
| 21 | +++ b/pipewire-jack/src/pipewire-jack.c | ||
| 22 | @@ -5318,7 +5318,7 @@ int jack_set_freewheel(jack_client_t* client, int onoff) | ||
| 23 | pw_thread_loop_lock(c->context.loop); | ||
| 24 | str = pw_properties_get(c->props, PW_KEY_NODE_GROUP); | ||
| 25 | if (str != NULL) { | ||
| 26 | - char *p = strstr(str, ",pipewire.freewheel"); | ||
| 27 | + const char *p = strstr(str, ",pipewire.freewheel"); | ||
| 28 | if (p == NULL) | ||
| 29 | p = strstr(str, "pipewire.freewheel"); | ||
| 30 | if (p == NULL && onoff) | ||
| 31 | diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c | ||
| 32 | index 21a5e53de..7dfe45911 100644 | ||
| 33 | --- a/spa/plugins/bluez5/bluez5-dbus.c | ||
| 34 | +++ b/spa/plugins/bluez5/bluez5-dbus.c | ||
| 35 | @@ -720,14 +720,12 @@ static const char *bap_features_get_uuid(struct bap_features *feat, size_t i) | ||
| 36 | /** Get feature name at \a i, or NULL if uuid doesn't match */ | ||
| 37 | static const char *bap_features_get_name(struct bap_features *feat, size_t i, const char *uuid) | ||
| 38 | { | ||
| 39 | - char *pos; | ||
| 40 | - | ||
| 41 | if (i >= feat->dict.n_items) | ||
| 42 | return NULL; | ||
| 43 | if (!spa_streq(feat->dict.items[i].value, uuid)) | ||
| 44 | return NULL; | ||
| 45 | |||
| 46 | - pos = strchr(feat->dict.items[i].key, ':'); | ||
| 47 | + const char *pos = strchr(feat->dict.items[i].key, ':'); | ||
| 48 | if (!pos) | ||
| 49 | return NULL; | ||
| 50 | return pos + 1; | ||
| 51 | @@ -1336,7 +1334,6 @@ static struct spa_bt_adapter *adapter_find(struct spa_bt_monitor *monitor, const | ||
| 52 | static int parse_modalias(const char *modalias, uint16_t *source, uint16_t *vendor, | ||
| 53 | uint16_t *product, uint16_t *version) | ||
| 54 | { | ||
| 55 | - char *pos; | ||
| 56 | unsigned int src, i, j, k; | ||
| 57 | |||
| 58 | if (spa_strstartswith(modalias, "bluetooth:")) | ||
| 59 | @@ -1346,7 +1343,7 @@ static int parse_modalias(const char *modalias, uint16_t *source, uint16_t *vend | ||
| 60 | else | ||
| 61 | return -EINVAL; | ||
| 62 | |||
| 63 | - pos = strchr(modalias, ':'); | ||
| 64 | + const char *pos = strchr(modalias, ':'); | ||
| 65 | if (pos == NULL) | ||
| 66 | return -EINVAL; | ||
| 67 | |||
| 68 | diff --git a/spa/plugins/support/logger.c b/spa/plugins/support/logger.c | ||
| 69 | index c6e6ca4b8..6ea5f31b5 100644 | ||
| 70 | --- a/spa/plugins/support/logger.c | ||
| 71 | +++ b/spa/plugins/support/logger.c | ||
| 72 | @@ -73,7 +73,7 @@ impl_log_logtv(void *object, | ||
| 73 | char timestamp[18] = {0}; | ||
| 74 | char topicstr[32] = {0}; | ||
| 75 | char filename[64] = {0}; | ||
| 76 | - char location[1000 + RESERVED_LENGTH], *p, *s; | ||
| 77 | + char location[1000 + RESERVED_LENGTH], *p; | ||
| 78 | static const char * const levels[] = { "-", "E", "W", "I", "D", "T", "*T*" }; | ||
| 79 | const char *prefix = "", *suffix = ""; | ||
| 80 | int size, len; | ||
| 81 | @@ -118,7 +118,7 @@ impl_log_logtv(void *object, | ||
| 82 | |||
| 83 | |||
| 84 | if (impl->line && line != 0) { | ||
| 85 | - s = strrchr(file, '/'); | ||
| 86 | + const char *s = strrchr(file, '/'); | ||
| 87 | spa_scnprintf(filename, sizeof(filename), "[%16.16s:%5i %s()]", | ||
| 88 | s ? s + 1 : file, line, func); | ||
| 89 | } | ||
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.0.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.0.bb index dea1a169d0..444b3bd633 100644 --- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.0.bb +++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.6.0.bb | |||
| @@ -14,8 +14,9 @@ DEPENDS = "dbus ncurses" | |||
| 14 | 14 | ||
| 15 | SRCREV = "700cea78dbe7564131d51b21a7795e2567ee048a" | 15 | SRCREV = "700cea78dbe7564131d51b21a7795e2567ee048a" |
| 16 | BRANCH = "${@oe.utils.trim_version('${PV}', 2)}" | 16 | BRANCH = "${@oe.utils.trim_version('${PV}', 2)}" |
| 17 | SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=${BRANCH};protocol=https;tag=${PV}" | 17 | SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=${BRANCH};protocol=https;tag=${PV} \ |
| 18 | 18 | file://0001-treewide-fix-some-Wdiscarded-qualifiers.patch \ | |
| 19 | " | ||
| 19 | 20 | ||
| 20 | inherit meson pkgconfig systemd gettext useradd | 21 | inherit meson pkgconfig systemd gettext useradd |
| 21 | 22 | ||
