Skip to content

Commit 922e3c3

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 9681c8f commit 922e3c3

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
@@ -256,7 +256,8 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c
256256
my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();
257257

258258
# More symbols are needed with OpenSSL 1.1.0 and above.
259-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
259+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
260+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
260261
{
261262
print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";
262263
print $o "#define HAVE_BIO_GET_DATA 1\n";
@@ -578,7 +579,8 @@ sub AddProject
578579
# changed their library names from:
579580
# - libeay to libcrypto
580581
# - ssleay to libssl
581-
if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
582+
if ( ($digit1 >= '3' && $digit2 >= '0' && $digit3 >= '0')
583+
|| ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0'))
582584
{
583585
my $dbgsuffix;
584586
my $libsslpath;

0 commit comments

Comments
 (0)