Upgrade curl to curl-7_78_0
Test: make
Change-Id: Icd602cfe251ab2fcd31320b08894b303d1a824d8
diff --git a/lib/select.c b/lib/select.c
index 917133b..52dca5a 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <[email protected]>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <[email protected]>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -130,6 +130,7 @@
return r;
}
+#ifndef HAVE_POLL_FINE
/*
* This is a wrapper around select() to aid in Windows compatibility.
* A negative timeout value makes this function wait indefinitely,
@@ -141,11 +142,11 @@
* 0 = timeout
* N = number of signalled file descriptors
*/
-int Curl_select(curl_socket_t maxfd, /* highest socket number */
- fd_set *fds_read, /* sockets ready for reading */
- fd_set *fds_write, /* sockets ready for writing */
- fd_set *fds_err, /* sockets with errors */
- timediff_t timeout_ms) /* milliseconds to wait */
+static int our_select(curl_socket_t maxfd, /* highest socket number */
+ fd_set *fds_read, /* sockets ready for reading */
+ fd_set *fds_write, /* sockets ready for writing */
+ fd_set *fds_err, /* sockets with errors */
+ timediff_t timeout_ms) /* milliseconds to wait */
{
struct timeval pending_tv;
struct timeval *ptimeout;
@@ -220,6 +221,8 @@
#endif
}
+#endif
+
/*
* Wait for read or write events on a set of file descriptors. It uses poll()
* when a fine poll() is available, in order to avoid limits with FD_SETSIZE,
@@ -412,7 +415,7 @@
curl_socket_t is unsigned in such cases and thus -1 is the largest
value).
*/
- r = Curl_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
+ r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
if(r <= 0)
return r;
@@ -439,7 +442,7 @@
if(ufds[i].events & POLLPRI)
ufds[i].revents |= POLLPRI;
}
- if(ufds[i].revents != 0)
+ if(ufds[i].revents)
r++;
}