public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/criu] f44: Fix tty compiler error (const qualifier warning)
@ 2026-07-06 5:55 Adrian Reber
0 siblings, 0 replies; only message in thread
From: Adrian Reber @ 2026-07-06 5:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/criu
Branch : f44
Commit : f6264d32e15b8a00c5ed14b8f8e4bb3ff819a30a
Author : Adrian Reber <adrian@lisas.de>
Date : 2026-03-03T11:14:06+01:00
Stats : +41/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/criu/c/f6264d32e15b8a00c5ed14b8f8e4bb3ff819a30a?branch=f44
Log:
Fix tty compiler error (const qualifier warning)
Apply upstream patch 90300748effc to fix
-Werror=discarded-qualifiers in pts_fd_get_index().
Generated with Claude Code (https://claude.ai/code)
Signed-off-by: Adrian Reber <adrian@lisas.de>
---
diff --git a/0001-tty-fix-compiler-error.patch b/0001-tty-fix-compiler-error.patch
new file mode 100644
index 0000000..9b84c02
--- /dev/null
+++ b/0001-tty-fix-compiler-error.patch
@@ -0,0 +1,35 @@
+From 90300748effc1cf0fe56e35d3d1cc2ddfedab246 Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Wed, 26 Nov 2025 13:21:07 +0000
+Subject: [PATCH] tty: fix compiler error
+
+At least on tests running on Fedora rawhide following error could be
+seen:
+
+```
+ criu/tty.c: In function 'pts_fd_get_index':
+ criu/tty.c:262:21: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+ 262 | char *pos = strrchr(link->name, '/');
+ |
+```
+
+This fixes it.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+---
+ criu/tty.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/criu/tty.c b/criu/tty.c
+index ae23094b7b..9a4520d535 100644
+--- a/criu/tty.c
++++ b/criu/tty.c
+@@ -259,7 +259,7 @@ static int pts_fd_get_index(int fd, const struct fd_parms *p)
+ {
+ int index;
+ const struct fd_link *link = p->link;
+- char *pos = strrchr(link->name, '/');
++ const char *pos = strrchr(link->name, '/');
+
+ if (!pos || pos == (link->name + link->len - 1)) {
+ pr_err("Unexpected format on path %s\n", link->name + 1);
diff --git a/criu.spec b/criu.spec
index e37ceb3..ab8647c 100644
--- a/criu.spec
+++ b/criu.spec
@@ -13,12 +13,13 @@
Name: criu
Version: 4.2
-Release: 15%{?dist}
+Release: 16%{?dist}
Summary: Tool for Checkpoint/Restore in User-space
License: GPL-2.0-only AND LGPL-2.1-only AND MIT
URL: http://criu.org/
Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/criu-%{version}.tar.gz
Patch0: 0001-rseq-use-kernel-rseq.h-when-glibc-detects-it.patch
+Patch1: 0001-tty-fix-compiler-error.patch
# Add protobuf-c as a dependency.
# We use this patch because the protobuf-c package name
@@ -116,6 +117,7 @@ This script can help to workaround the so called "PID mismatch" problem.
%prep
%setup -q
%patch -P 0 -p1
+%patch -P 1 -p1
%patch -P 99 -p1
%build
@@ -204,6 +206,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%tmpfiles_create %{name}.conf
%changelog
+* Tue Mar 03 2026 Adrian Reber <areber@redhat.com> - 4.2-16
+- Fix tty compiler error (const qualifier warning)
+
* Tue Mar 03 2026 Adrian Reber <areber@redhat.com> - 4.2-15
- Fix rseq build failure with latest glibc in rawhide
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-06 5:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-06 5:55 [rpms/criu] f44: Fix tty compiler error (const qualifier warning) Adrian Reber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox