Skip to content

Commit e1a253c

Browse files
committed
Revert "Revert "lib: don't compare fd to FD_SETSIZE when using poll" (curl/curl@d293bf4) via b3a5e60"
This reverts commit f6cdb6c.
1 parent f6cdb6c commit e1a253c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vendor/curl/lib/select.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
106106
} \
107107
} while(0)
108108
#else
109+
#ifdef HAVE_POLL_FINE
110+
#define VALID_SOCK(s) ((s) >= 0) /* FD_SETSIZE is irrelevant for poll */
111+
#else
109112
#define VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
113+
#endif
110114
#define VERIFY_SOCK(x) do { \
111115
if(!VALID_SOCK(x)) { \
112116
SET_SOCKERRNO(EINVAL); \

0 commit comments

Comments
 (0)