From: Michael Osipov Date: Thu, 30 Nov 2023 16:07:03 +0000 (+0100) Subject: Fix detection on HP-UX (IA64) X-Git-Tag: openssl-3.1.5~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=035cadca90466a60a478684f5518ab25fc64a608;p=thirdparty%2Fopenssl.git Fix detection on HP-UX (IA64) HPE has a weird preference to prefix letters and zero-padding. Properly trim them before processing. CLA: trivial Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22891) (cherry picked from commit 253c5667a92efbbd1498b2f5b883da23c11b8930) --- diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm index b574f82f430..5da9282d6bc 100755 --- a/util/perl/OpenSSL/config.pm +++ b/util/perl/OpenSSL/config.pm @@ -82,7 +82,7 @@ my $guess_patterns = [ [ 'HP-UX:.*', sub { my $HPUXVER = $RELEASE; - $HPUXVER = s/[^.]*.[0B]*//; + $HPUXVER =~ s/[^.]*.[0B]*//; # HPUX 10 and 11 targets are unified return "${MACHINE}-hp-hpux1x" if $HPUXVER =~ m@1[0-9]@; return "${MACHINE}-hp-hpux"; @@ -321,6 +321,7 @@ sub determine_compiler_settings { # If we got a version number, process it if ($v) { + $v =~ s/[^.]*.0*// if $SYSTEM eq 'HP-UX'; $CCVENDOR = $k; # The returned version is expected to be one of