diff options
| author | Khem Raj <raj.khem@gmail.com> | 2026-04-10 12:05:47 +0200 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-05-04 13:57:32 +0100 |
| commit | 1efc8f9fa5cd8ad68c033239d08feb41e51f812e (patch) | |
| tree | 3cbe40c913d9e0223c3ac61bf1b4508a17f7c0c9 | |
| parent | 8d87b43a4fe62e1aa35e480e3e52d77f7307938b (diff) | |
| download | poky-1efc8f9fa5cd8ad68c033239d08feb41e51f812e.tar.gz | |
libxcrypt: Fix build wrt C23 support
latest glibc has better C23 support and exposes this problem
Fixes following errors seen in nativesdk-libxcrypt
| ../sources/libxcrypt-4.5.2/lib/crypt-sm3-yescrypt.c:139:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
| 139 | char *hptr = strchr ((const char *) intbuf->retval + 3, '$');
| | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 6 errors generated.
Compared to wrynose remove lib/crypt-sm3-yescrypt.c change, because
the file doesn't exist in the version used in scarthgap, it was failing
only in lib/crypt-gost-yescrypt.c
(From OE-Core rev: caab28b10a1f45981ab605d36a8707b63212e1f6)
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a666b8e71ecda97db58c90d5af137671f9823f38)
[YC: fixed patch format]
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
| -rw-r--r-- | meta/recipes-core/libxcrypt/files/174c24d6e87aeae631bc0a7bb1ba983cf8def4de.patch | 29 | ||||
| -rw-r--r-- | meta/recipes-core/libxcrypt/libxcrypt.inc | 4 |
2 files changed, 32 insertions, 1 deletions
diff --git a/meta/recipes-core/libxcrypt/files/174c24d6e87aeae631bc0a7bb1ba983cf8def4de.patch b/meta/recipes-core/libxcrypt/files/174c24d6e87aeae631bc0a7bb1ba983cf8def4de.patch new file mode 100644 index 0000000000..75749c054a --- /dev/null +++ b/meta/recipes-core/libxcrypt/files/174c24d6e87aeae631bc0a7bb1ba983cf8def4de.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From 174c24d6e87aeae631bc0a7bb1ba983cf8def4de Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Stanislav Zidek <szidek@redhat.com> | ||
| 3 | Date: Wed, 10 Dec 2025 14:03:54 +0100 | ||
| 4 | Subject: [PATCH] fix -Werror=discarded-qualifiers | ||
| 5 | |||
| 6 | On Fedora rawhide (to be Fedora 44), gcc became more strict | ||
| 7 | wrt. const-ness. | ||
| 8 | |||
| 9 | Upstream-Status: Backport [https://github.com/besser82/libxcrypt/pull/220 without lib/crypt-sm3-yescrypt.c] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | |||
| 12 | --- | ||
| 13 | lib/crypt-gost-yescrypt.c | 2 +- | ||
| 14 | lib/crypt-sm3-yescrypt.c | 2 +- | ||
| 15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/lib/crypt-gost-yescrypt.c b/lib/crypt-gost-yescrypt.c | ||
| 18 | index 190ae94b..e9dc7e80 100644 | ||
| 19 | --- a/lib/crypt-gost-yescrypt.c | ||
| 20 | +++ b/lib/crypt-gost-yescrypt.c | ||
| 21 | @@ -131,7 +131,7 @@ crypt_gost_yescrypt_rn (const char *phrase, size_t phr_size, | ||
| 22 | intbuf->outbuf[1] = 'g'; | ||
| 23 | |||
| 24 | /* extract yescrypt output from "$y$param$salt$output" */ | ||
| 25 | - char *hptr = strchr ((const char *) intbuf->retval + 3, '$'); | ||
| 26 | + char *hptr = strchr ((char *) intbuf->retval + 3, '$'); | ||
| 27 | if (!hptr) | ||
| 28 | { | ||
| 29 | errno = EINVAL; | ||
diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc index 11ec87c14e..4e240f4d14 100644 --- a/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/meta/recipes-core/libxcrypt/libxcrypt.inc | |||
| @@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=c0a30e2b1502c55a7f37e412cd6c6a4b \ | |||
| 9 | 9 | ||
| 10 | inherit autotools pkgconfig | 10 | inherit autotools pkgconfig |
| 11 | 11 | ||
| 12 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https" | 12 | SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https \ |
| 13 | file://174c24d6e87aeae631bc0a7bb1ba983cf8def4de.patch \ | ||
| 14 | " | ||
| 13 | SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf" | 15 | SRCREV = "f531a36aa916a22ef2ce7d270ba381e264250cbf" |
| 14 | SRCBRANCH ?= "master" | 16 | SRCBRANCH ?= "master" |
| 15 | 17 | ||
