[PATCH v4 4/8] libxcrypt: avoid discarded-qualifiers build failure with glibc 2.43

Hemanth.KumarMD
2026-03-12T16:11:34Z

With the glibc 2.43 upgrade, building nativesdk-libxcrypt triggers a
-Wdiscarded-qualifiers warning in crypt-gost-yescrypt.c and
crypt-sm3-yescrypt.c which becomes a build failure due to -Werror.

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
meta/recipes-core/libxcrypt/libxcrypt.inc | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc b/meta/recipes-core/libxcrypt/libxcrypt.inc
index 9aed0b9d81..c9cd5e6ef4 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt.inc
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -17,6 +17,7 @@ PROVIDES = "virtual/crypt"
BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error"
CPPFLAGS:append:class-nativesdk = " -Wno-error"
+CFLAGS:append:class-nativesdk = " -Wno-error=discarded-qualifiers"

API = "--disable-obsolete-api"
EXTRA_OECONF += "${API}"
--
2.49.0