mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
poll: FD_SETSIZE is only for the count value of FD_SET on Windows.
This commit is contained in:
@@ -149,10 +149,12 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
|
|||||||
if (fds[i].fd == SSH_INVALID_SOCKET) {
|
if (fds[i].fd == SSH_INVALID_SOCKET) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifndef _WIN32
|
||||||
if (fds[i].fd >= FD_SETSIZE) {
|
if (fds[i].fd >= FD_SETSIZE) {
|
||||||
rc = -1;
|
rc = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (fds[i].events & (POLLIN | POLLRDNORM)) {
|
if (fds[i].events & (POLLIN | POLLRDNORM)) {
|
||||||
FD_SET (fds[i].fd, &readfds);
|
FD_SET (fds[i].fd, &readfds);
|
||||||
|
|||||||
Reference in New Issue
Block a user