Skip to content

Commit abb9ee9

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 842fe61 commit abb9ee9

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

523523
# More symbols are needed with OpenSSL 1.1.0 and above.
524-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
524+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
525+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
525526
{
526527
$define{HAVE_ASN1_STRING_GET0_DATA} = 1;
527528
$define{HAVE_BIO_GET_DATA} = 1;
@@ -936,7 +937,8 @@ sub AddProject
936937
# changed their library names from:
937938
# - libeay to libcrypto
938939
# - ssleay to libssl
939-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
940+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
941+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
940942
{
941943
my $dbgsuffix;
942944
my $libsslpath;

0 commit comments

Comments
 (0)