libpv: Fix build with OpenSSL 1.1

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 <mhartmay@linux.ibm.com>
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
Dan Horák
2024-03-27 17:57:06 +00:00
committed by Steffen Eiden
parent 90a2e6d70e
commit 13d721afd3

View File

@@ -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();