Merge pull request #197 from Zash/errno-bug-again

Expand workaround for zero errno to OpenSSL 3.0.x
This commit is contained in:
Bruno Silvestre 2023-07-12 21:41:40 -03:00 committed by GitHub
commit 5787d51bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -48,8 +48,8 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#if !defined(LIBRESSL_VERSION_NUMBER) && ((OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x10101000L) #if !defined(LIBRESSL_VERSION_NUMBER) && ((OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x10101000L || (OPENSSL_VERSION_NUMBER & 0xFFFFF000L) == 0x30000000L)
#define LSEC_OPENSSL_1_1_1 #define LSEC_OPENSSL_ERRNO_BUG
#endif #endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@ -47,8 +47,8 @@ static int lsec_socket_error()
#if defined(WIN32) #if defined(WIN32)
return WSAGetLastError(); return WSAGetLastError();
#else #else
#if defined(LSEC_OPENSSL_1_1_1) #if defined(LSEC_OPENSSL_ERRNO_BUG)
// Bug in OpenSSL 1.1.1 // Bug in OpenSSL
if (errno == 0) if (errno == 0)
return LSEC_IO_SSL; return LSEC_IO_SSL;
#endif #endif