Allow OPENSSL_VERSION_TEXT string match without last line for OpenSUSE

This commit is contained in:
Hiroshi SHIBATA 2022-09-22 13:08:23 +09:00
parent ef66bd1f3c
commit 7fdf6ecfe0
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -1090,7 +1090,7 @@ has_broken_mac_openssl() {
}
system_openssl_version() {
local version_text=$(printf '#include <openssl/opensslv.h>\nOPENSSL_VERSION_TEXT\n' | cc -xc -E - 2>/dev/null | tail -n 1)
local version_text=$(printf '#include <openssl/opensslv.h>\nOPENSSL_VERSION_TEXT\n' | cc -xc -E - 2>/dev/null)
if [[ $version_text == *"OpenSSL "* ]]; then
local version=${version_text#*OpenSSL }
version=${version%% *}