mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-20 04:18:22 +01:00
Merge pull request #197 from Zash/errno-bug-again
Expand workaround for zero errno to OpenSSL 3.0.x
This commit is contained in:
commit
5787d51bb8
@ -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
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user