diff options
author | dartraiden <wowemuh@gmail.com> | 2025-04-21 09:33:29 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2025-04-21 09:50:38 +0300 |
commit | cf6ba06cd445f1f4554701637d5bab581acfba98 (patch) | |
tree | 0d9b618df1c8f888cb37221be0590f4a677fe477 /libs/libcurl/src/select.c | |
parent | 842ec200cd37ae05f2a9c56f2a4040088d2ac917 (diff) |
libcurl: update to 8.13.0
Diffstat (limited to 'libs/libcurl/src/select.c')
-rw-r--r-- | libs/libcurl/src/select.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/libcurl/src/select.c b/libs/libcurl/src/select.c index e4e66e17d2..ba8c00153d 100644 --- a/libs/libcurl/src/select.c +++ b/libs/libcurl/src/select.c @@ -74,7 +74,7 @@ int Curl_wait_ms(timediff_t timeout_ms) if(!timeout_ms)
return 0;
if(timeout_ms < 0) {
- SET_SOCKERRNO(EINVAL);
+ SET_SOCKERRNO(SOCKEINVAL);
return -1;
}
#if defined(MSDOS)
@@ -86,7 +86,7 @@ int Curl_wait_ms(timediff_t timeout_ms) timeout_ms = ULONG_MAX-1;
/* do not use ULONG_MAX, because that is equal to INFINITE */
#endif
- Sleep((ULONG)timeout_ms);
+ Sleep((DWORD)timeout_ms);
#else
/* avoid using poll() for this since it behaves incorrectly with no sockets
on Apple operating systems */
@@ -96,7 +96,7 @@ int Curl_wait_ms(timediff_t timeout_ms) }
#endif /* _WIN32 */
if(r) {
- if((r == -1) && (SOCKERRNO == EINTR))
+ if((r == -1) && (SOCKERRNO == SOCKEINTR))
/* make EINTR from select or poll not a "lethal" error */
r = 0;
else
@@ -312,7 +312,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) pending_ms = 0;
r = poll(ufds, nfds, pending_ms);
if(r <= 0) {
- if((r == -1) && (SOCKERRNO == EINTR))
+ if((r == -1) && (SOCKERRNO == SOCKEINTR))
/* make EINTR from select or poll not a "lethal" error */
r = 0;
return r;
@@ -360,7 +360,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) */
r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
if(r <= 0) {
- if((r == -1) && (SOCKERRNO == EINTR))
+ if((r == -1) && (SOCKERRNO == SOCKEINTR))
/* make EINTR from select or poll not a "lethal" error */
r = 0;
return r;
@@ -410,6 +410,11 @@ void Curl_pollfds_init(struct curl_pollfds *cpfds, }
}
+void Curl_pollfds_reset(struct curl_pollfds *cpfds)
+{
+ cpfds->n = 0;
+}
+
void Curl_pollfds_cleanup(struct curl_pollfds *cpfds)
{
DEBUGASSERT(cpfds);
|