From deb40d1bf66631f81e0fab9f4c5c14cf3dea1b71 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Jun 2026 01:40:06 +0200 Subject: [PATCH] rustls --- lib/vtls/rustls.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c index 9890f65538..8d0285a74b 100644 --- a/lib/vtls/rustls.c +++ b/lib/vtls/rustls.c @@ -160,7 +160,11 @@ static ssize_t tls_recv_more(struct Curl_cfilter *cf, io_ctx.data = data; io_error = rustls_connection_read_tls(backend->conn, read_cb, &io_ctx, &tls_bytes_read); - if(io_error == EAGAIN || io_error == EWOULDBLOCK) { + if(io_error == EWOULDBLOCK +#if EAGAIN != EWOULDBLOCK + || io_error == EAGAIN +#endif + ) { *err = CURLE_AGAIN; return -1; } @@ -270,7 +274,11 @@ static CURLcode cr_flush_out(struct Curl_cfilter *cf, struct Curl_easy *data, while(rustls_connection_wants_write(rconn)) { io_error = rustls_connection_write_tls(rconn, write_cb, &io_ctx, &tlswritten); - if(io_error == EAGAIN || io_error == EWOULDBLOCK) { + if(io_error == EWOULDBLOCK +#if EAGAIN != EWOULDBLOCK + || io_error == EAGAIN +#endif + ) { CURL_TRC_CF(data, cf, "cf_send: EAGAIN after %zu bytes", tlswritten_total); return CURLE_AGAIN;