aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-10-20 16:49:03 +0900
committerMichael Paquier <michael@paquier.xyz>2021-10-20 16:49:03 +0900
commit1539e0ecd6a447fca14920834d4546c60ff20f10 (patch)
tree629e11dacec9ce15bc30100a32982d1465a33628 /src
parent6c8d1c197bd67e78c12c68d8f0bd111a59e7bccd (diff)
downloadpostgresql-1539e0ecd6a447fca14920834d4546c60ff20f10.tar.gz
postgresql-1539e0ecd6a447fca14920834d4546c60ff20f10.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
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/Solution.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 4a8b7b47731..c47863cb90e 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -254,7 +254,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'))
{
print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";
print $o "#define HAVE_BIO_GET_DATA 1\n";
@@ -662,7 +663,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;