Skip to content

Commit 41f30ec

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 c2c618f commit 41f30ec

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

551551
# More symbols are needed with OpenSSL 1.1.0 and above.
552-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
552+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
553+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
553554
{
554555
$define{HAVE_ASN1_STRING_GET0_DATA} = 1;
555556
$define{HAVE_BIO_GET_DATA} = 1;
@@ -957,7 +958,8 @@ sub AddProject
957958
# changed their library names from:
958959
# - libeay to libcrypto
959960
# - ssleay to libssl
960-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
961+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
962+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
961963
{
962964
my $dbgsuffix;
963965
my $libsslpath;

0 commit comments

Comments
 (0)