From 174c24d6e87aeae631bc0a7bb1ba983cf8def4de Mon Sep 17 00:00:00 2001
From: Stanislav Zidek <szidek@redhat.com>
Date: Wed, 10 Dec 2025 14:03:54 +0100
Subject: [PATCH] fix -Werror=discarded-qualifiers

On Fedora rawhide (to be Fedora 44), gcc became more strict
wrt. const-ness.

Upstream-Status: Backport [https://github.com/besser82/libxcrypt/pull/220 without lib/crypt-sm3-yescrypt.c]
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 lib/crypt-gost-yescrypt.c | 2 +-
 lib/crypt-sm3-yescrypt.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/crypt-gost-yescrypt.c b/lib/crypt-gost-yescrypt.c
index 190ae94b..e9dc7e80 100644
--- a/lib/crypt-gost-yescrypt.c
+++ b/lib/crypt-gost-yescrypt.c
@@ -131,7 +131,7 @@ crypt_gost_yescrypt_rn (const char *phrase, size_t phr_size,
   intbuf->outbuf[1] = 'g';
 
   /* extract yescrypt output from "$y$param$salt$output" */
-  char *hptr = strchr ((const char *) intbuf->retval + 3, '$');
+  char *hptr = strchr ((char *) intbuf->retval + 3, '$');
   if (!hptr)
     {
       errno = EINVAL;
