diff options
author | Michael Paquier <michael@paquier.xyz> | 2021-10-20 16:48:24 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2021-10-20 16:48:24 +0900 |
commit | 41f30ecc29c89285d3eecd435906c4e9cb048be4 (patch) | |
tree | e61d7a0a9c13e5fbd8da32d7bfb18f15ab63da23 | |
parent | c2c618ff1137f9ef58827f57e4ec0f97453e454e (diff) | |
download | postgresql-41f30ecc29c89285d3eecd435906c4e9cb048be4.tar.gz postgresql-41f30ecc29c89285d3eecd435906c4e9cb048be4.zip |
Fix build of MSVC with OpenSSL 3.0.0
The build scripts of Visual Studio would fail to detect properly a 3.0.0
build as the check on the second digit was failing. This is adjusted
where needed, allowing the builds to complete. Note that the MSIs of
OpenSSL mentioned in the documentation have not changed any library
names for Win32 and Win64, making this change straight-forward.
Reported-by: htalaco, via github
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/YW5XKYkq6k7OtrFq@paquier.xyz
Backpatch-through: 9.6
-rw-r--r-- | src/tools/msvc/Solution.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 165a93987ac..43fd1be0888 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -549,7 +549,8 @@ sub GenerateFiles my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion(); # More symbols are needed with OpenSSL 1.1.0 and above. - if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') + if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0') + || ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')) { $define{HAVE_ASN1_STRING_GET0_DATA} = 1; $define{HAVE_BIO_GET_DATA} = 1; @@ -957,7 +958,8 @@ sub AddProject # changed their library names from: # - libeay to libcrypto # - ssleay to libssl - if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') + if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0') + || ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')) { my $dbgsuffix; my $libsslpath; |