public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/virt-viewer] rawhide: Fix subtitle compile error with glibc 2.43
@ 2026-11-09 10:48 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-11-09 10:48 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/virt-viewer
Branch : rawhide
Commit : 017fcc7b1103c99b67942cb9d1b34bbe7d01c5f7
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-11-06T09:52:18-05:00
Stats : +48/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/virt-viewer/c/017fcc7b1103c99b67942cb9d1b34bbe7d01c5f7?branch=rawhide
Log:
Fix subtitle compile error with glibc 2.43
Starting with glibc 2.43, `strstr(…)` returns a `const char*` if its
first argument is a `const char*`, causing a compilation error. Fix the
const-discard, and replace the temporary modification of the const title
string with a length-limited format string expression.
https://gitlab.com/virt-viewer/virt-viewer/-/commit/a634fa8d9fbc59b093f2f07110b2c867f622599d
---
diff --git a/0001-Fix-subtitle-compile-error.patch b/0001-Fix-subtitle-compile-error.patch
new file mode 100644
index 0000000..7723f03
--- /dev/null
+++ b/0001-Fix-subtitle-compile-error.patch
@@ -0,0 +1,47 @@
+From a634fa8d9fbc59b093f2f07110b2c867f622599d Mon Sep 17 00:00:00 2001
+From: Corubba Smith <corubba@gmx.de>
+Date: Wed, 5 Aug 2026 23:21:13 +0200
+Subject: [PATCH] Fix subtitle compile error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Starting with glibc 2.43, `strstr(…)` returns a `const char*` if its
+first argument is a `const char*`, causing a compilation error. Fix the
+const-discard, and replace the temporary modification of the const title
+string with a length-limited format string expression.
+
+Fixes: 0383cc4c9be9 ("Improve window title when connected to newer spice-server")
+
+Signed-off-by: Corubba Smith <corubba@gmx.de>
+---
+ src/virt-viewer-app.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
+index 5128f7b..1803bf6 100644
+--- a/src/virt-viewer-app.c
++++ b/src/virt-viewer-app.c
+@@ -983,7 +983,7 @@ virt_viewer_app_set_window_subtitle(VirtViewerApp *app,
+
+ if (title != NULL) {
+ VirtViewerDisplay *display = virt_viewer_window_get_display(window);
+- gchar *d = strstr(title, "%d");
++ const gchar *d = strstr(title, "%d");
+ gchar *desc = NULL;
+
+ if (display && VIRT_VIEWER_IS_DISPLAY_VTE(display)) {
+@@ -993,9 +993,7 @@ virt_viewer_app_set_window_subtitle(VirtViewerApp *app,
+ }
+
+ if (d != NULL) {
+- *d = '\0';
+- subtitle = g_strdup_printf("%s%s%s", title, desc, d + 2);
+- *d = '%';
++ subtitle = g_strdup_printf("%.*s%s%s", (int)(d - title), title, desc, d + 2);
+ } else
+ subtitle = g_strdup_printf("%s (%s)", title, desc);
+ g_free(desc);
+--
+GitLab
+
diff --git a/virt-viewer.spec b/virt-viewer.spec
index d39882c..8fa05e0 100644
--- a/virt-viewer.spec
+++ b/virt-viewer.spec
@@ -18,6 +18,7 @@ URL: https://gitlab.com/virt-viewer/virt-viewer
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.xz
Patch: 0001-data-remove-bogus-param-for-meson-i18n.merge_file.patch
Patch: 0001-Read-oVirt-CA-and-pass-it-to-gtk-vnc.patch
+Patch: 0001-Fix-subtitle-compile-error.patch
Requires: openssh-clients
# Our bash completion script uses virsh to list domains
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-09 10:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 10:48 [rpms/virt-viewer] rawhide: Fix subtitle compile error with glibc 2.43 Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox