Skip to content

Commit 1539e0e

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 6c8d1c1 commit 1539e0e

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
@@ -254,7 +254,8 @@ sub GenerateFiles
254254
my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();
255255

256256
# More symbols are needed with OpenSSL 1.1.0 and above.
257-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
257+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
258+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
258259
{
259260
print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";
260261
print $o "#define HAVE_BIO_GET_DATA 1\n";
@@ -662,7 +663,8 @@ sub AddProject
662663
# changed their library names from:
663664
# - libeay to libcrypto
664665
# - ssleay to libssl
665-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
666+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
667+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
666668
{
667669
my $dbgsuffix;
668670
my $libsslpath;

0 commit comments

Comments
 (0)