From 13d721afd3fa468fcb10647b218238fbdeccfc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 27 Mar 2024 17:57:06 +0000 Subject: [PATCH] libpv: Fix build with OpenSSL 1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSSL 1.1 seems to use a non-const parameter to X509_name_dup(), but x509_armonk_locality_fixup() is passing a const there. The compile then fails on "discards 'const' qualifier", when -Werror is used. Thus resolve with a type-cast like in pv_c2b_name(). GitHub-ID: https://github.com/ibm-s390-linux/s390-tools/pull/167 Reviewed-by: Marc Hartmayer Signed-off-by: Dan HorĂ¡k Signed-off-by: Steffen Eiden --- libpv/cert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpv/cert.c b/libpv/cert.c index f4774fcb..44355e93 100644 --- a/libpv/cert.c +++ b/libpv/cert.c @@ -1383,7 +1383,7 @@ static X509_NAME *x509_armonk_locality_fixup(const X509_NAME *name) PV_IBM_Z_SUBJECT_LOCALITY_NAME_ARMONK)) return NULL; - ret = X509_NAME_dup(name); + ret = X509_NAME_dup((X509_NAME *)name); if (!ret) g_abort();