From 02b7df4d83b71f3e275220ea4163ed6da3259c4a Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 16 Feb 2026 19:47:13 +0000 Subject: [PATCH] Fix build for OpenSSL <3.0 --- nsock/src/nsock_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nsock/src/nsock_core.c b/nsock/src/nsock_core.c index 371c8ca86..f1ea74228 100644 --- a/nsock/src/nsock_core.c +++ b/nsock/src/nsock_core.c @@ -743,12 +743,14 @@ static int do_actual_read(struct npool *ms, struct nevent *nse) { buflen = 0; break; case SSL_ERROR_SSL: +#ifdef SSL_R_UNEXPECTED_EOF_WHILE_READING /* On an unexpected EOF, the returned error is SSL_ERROR_SSL with a * SSL_R_UNEXPECTED_EOF_WHILE_READING on the error stack */ if (SSL_R_UNEXPECTED_EOF_WHILE_READING == ERR_peek_error()) { buflen = 0; break; } +#endif default: assert(err != SSL_ERROR_NONE); /* Unexpected error */ @@ -757,7 +759,7 @@ static int do_actual_read(struct npool *ms, struct nevent *nse) { nse->errnum = EIO; nsock_log_info("SSL_read() failed for reason %d on NSI %li", err, iod->id); - while (err = ERR_get_error()) { + while (0 != (err = ERR_get_error())) { nsock_log_info("Additional SSL error: %s", ERR_error_string(err, NULL)); } return -1;