1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

mqttd: s/errno/SOCKERRNO

To behave proper on Windows
Reported-by: Gisle Vanem
Bug: 5e855bbd18 (r38507132)
Closes #5241
This commit is contained in:
Daniel Stenberg 2020-04-15 15:48:38 +02:00
parent c712009838
commit de2126b182
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -643,7 +643,7 @@ static bool incoming(curl_socket_t listenfd)
logmsg("signalled to die, exiting...");
return FALSE;
}
} while((rc == -1) && ((error = errno) == EINTR));
} while((rc == -1) && ((error = SOCKERRNO) == EINTR));
if(rc < 0) {
logmsg("select() failed with error: (%d) %s",
@ -700,9 +700,7 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
rc = wait_ms(delay);
if(rc) {
/* should not happen */
error = errno;
logmsg("wait_ms() failed with error: (%d) %s",
error, strerror(error));
logmsg("wait_ms() failed with error: %d", rc);
sclose(sock);
return CURL_SOCKET_BAD;
}