public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adrian Reber <adrian@lisas.de>
To: git-commits@fedoraproject.org
Subject: [rpms/criu] f43: Fix tty compiler error (const qualifier warning)
Date: Mon, 06 Jul 2026 06:07:52 GMT	[thread overview]
Message-ID: <178331807271.1.8236394696413983517.rpms-criu-f6264d32e15b@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/criu
            Branch : f43
            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=f43

            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
 

                 reply	other threads:[~2026-07-06  6:07 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=178331807271.1.8236394696413983517.rpms-criu-f6264d32e15b@fedoraproject.org \
    --to=adrian@lisas.de \
    --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