public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/virt-viewer] rawhide: Fix subtitle compile error with glibc 2.43
Date: Mon, 09 Nov 2026 10:48:24 GMT [thread overview]
Message-ID: <179422130494.1.5745540179070263815.rpms-virt-viewer-017fcc7b1103@fedoraproject.org> (raw)
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
reply other threads:[~2026-11-09 10:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179422130494.1.5745540179070263815.rpms-virt-viewer-017fcc7b1103@fedoraproject.org \
--to=yselkowi@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox