guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit de930c9e4ef1fda829e57635aa1bda8ab082c917
Author: Yelninei <[email protected]>
AuthorDate: Fri May 15 06:46:21 2026 +0000

    gnu: libxcrypt: Fix build with glibc 2.43.
    
    * gnu/packages/patches/libxcrypt-const.patch: New patch.
    * gnu/packages/crypto.scm (libxcrypt): Add patch
    * gnu/local.mk (dist_patch_DATA): Register it.
    
    Change-Id: I4b5c18cceb59d0d5cf7ce99e66c0163e207c7820
---
 gnu/local.mk                             |  1 +
 gnu/packages/crypto.scm                  |  4 +++-
 gnu/packages/patches/libxcrypt-C23.patch | 38 ++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index eb2726b8f4f..f8ad7f8891c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1881,6 +1881,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/libvpx-CVE-2016-2818.patch              \
   %D%/packages/patches/libvpx-CVE-2026-2447.patch              \
   %D%/packages/patches/libxcb-path-max.patch                   \
+  %D%/packages/patches/libxcrypt-C23.patch                     \
   %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch  \
   %D%/packages/patches/libwpd-gcc-compat.patch                 \
   %D%/packages/patches/libxt-guix-search-paths.patch           \
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 1dedbd36519..f3c8f02522b 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -1807,7 +1807,9 @@ checksum tool based on the BLAKE3 cryptographic hash 
function.")
          "https://github.com/besser82/libxcrypt/releases/download/v"; version
          "/libxcrypt-" version ".tar.xz"))
        (sha256
-        (base32 "0wf0mr17jp4xfw6bdd8gqpddc5gijpyk4yinsp68nhhsq0qkllbi"))))
+        (base32 "0wf0mr17jp4xfw6bdd8gqpddc5gijpyk4yinsp68nhhsq0qkllbi"))
+       (patches
+        (search-patches "libxcrypt-C23.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      (list perl))
diff --git a/gnu/packages/patches/libxcrypt-C23.patch 
b/gnu/packages/patches/libxcrypt-C23.patch
new file mode 100644
index 00000000000..15cb405b418
--- /dev/null
+++ b/gnu/packages/patches/libxcrypt-C23.patch
@@ -0,0 +1,38 @@
+From 174c24d6e87aeae631bc0a7bb1ba983cf8def4de Mon Sep 17 00:00:00 2001
+From: Stanislav Zidek <[email protected]>
+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.
+---
+ 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;
+diff --git a/lib/crypt-sm3-yescrypt.c b/lib/crypt-sm3-yescrypt.c
+index 4f42aa66..17da83e1 100644
+--- a/lib/crypt-sm3-yescrypt.c
++++ b/lib/crypt-sm3-yescrypt.c
+@@ -136,7 +136,7 @@ crypt_sm3_yescrypt_rn (const char *phrase, size_t phr_size,
+   intbuf->outbuf[3] = '3';
+ 
+   /* 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;

Reply via email to