This commit is contained in:
Viktor Szakats 2026-06-08 01:47:41 +02:00
parent deb40d1bf6
commit 921c610b68
No known key found for this signature in database
2 changed files with 10 additions and 4 deletions

View file

@ -1137,6 +1137,12 @@ typedef unsigned int curl_bit;
#define SOCKEWOULDBLOCK EWOULDBLOCK
#endif
#if EAGAIN != SOCKEWOULDBLOCK
#define SOCK_EAGAIN_EWOULDBLOCK(e) ((e) == EAGAIN || (e) == SOCKEWOULDBLOCK)
#else
#define SOCK_EAGAIN_EWOULDBLOCK(e) ((e) == EAGAIN)
#endif
/*
* Macro argv_item_t hides platform details to code using it.
*/

View file

@ -206,7 +206,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
;
if(!curlx_sztouz(rv, psent)) {
if(SOCKERRNO == EAGAIN || SOCKERRNO == SOCKEWOULDBLOCK) {
if(SOCK_EAGAIN_EWOULDBLOCK(SOCKERRNO)) {
result = CURLE_AGAIN;
goto out;
}
@ -487,7 +487,7 @@ static CURLcode recvmmsg_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(mcount == -1) {
if(SOCKERRNO == EAGAIN || SOCKERRNO == SOCKEWOULDBLOCK) {
if(SOCK_EAGAIN_EWOULDBLOCK(SOCKERRNO)) {
CURL_TRC_CF(data, cf, "ingress, recvmmsg -> EAGAIN");
goto out;
}
@ -574,7 +574,7 @@ static CURLcode recvmsg_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(!curlx_sztouz(rc, &nread)) {
if(SOCKERRNO == EAGAIN || SOCKERRNO == SOCKEWOULDBLOCK) {
if(SOCK_EAGAIN_EWOULDBLOCK(SOCKERRNO)) {
goto out;
}
if(!cf->connected && SOCKERRNO == SOCKECONNREFUSED) {
@ -644,7 +644,7 @@ static CURLcode recvfrom_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(!curlx_sztouz(rv, &nread)) {
if(SOCKERRNO == EAGAIN || SOCKERRNO == SOCKEWOULDBLOCK) {
if(SOCK_EAGAIN_EWOULDBLOCK(SOCKERRNO)) {
CURL_TRC_CF(data, cf, "ingress, recvfrom -> EAGAIN");
goto out;
}