Skip to content

Commit e00d45f

Browse files
committed
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
1 parent 4589c90 commit e00d45f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tools/msvc/Solution.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ sub GenerateFiles
258258
my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();
259259

260260
# More symbols are needed with OpenSSL 1.1.0 and above.
261-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
261+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
262+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
262263
{
263264
print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";
264265
print $o "#define HAVE_BIO_GET_DATA 1\n";
@@ -628,7 +629,8 @@ sub AddProject
628629
# changed their library names from:
629630
# - libeay to libcrypto
630631
# - ssleay to libssl
631-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
632+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
633+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
632634
{
633635
my $dbgsuffix;
634636
my $libsslpath;

0 commit comments

Comments
 (0)