aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-07-06 00:39:34 +0200
committerAndreas Schneider <asn@cynapses.org>2010-07-06 00:41:00 +0200
commitb8180f4069f9d01bf8fb48c024c181f8b8536ce2 (patch)
tree669a38ddf9f4d4813734f825000c84c4c6639107
parent94b00cc7625bf139a72c3c8d5f8c30243319f5b4 (diff)
downloadlibssh-b8180f4069f9d01bf8fb48c024c181f8b8536ce2.tar.gz
libssh-b8180f4069f9d01bf8fb48c024c181f8b8536ce2.tar.xz
libssh-b8180f4069f9d01bf8fb48c024c181f8b8536ce2.zip
poll: FD_SETSIZE is only for the count value of FD_SET on Windows.
-rw-r--r--libssh/poll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libssh/poll.c b/libssh/poll.c
index b4e37cd..34361a9 100644
--- a/libssh/poll.c
+++ b/libssh/poll.c
@@ -149,10 +149,12 @@ static int bsd_poll(ssh_pollfd_t *fds, nfds_t nfds, int timeout) {
if (fds[i].fd == SSH_INVALID_SOCKET) {
continue;
}
+#ifndef _WIN32
if (fds[i].fd >= FD_SETSIZE) {
rc = -1;
break;
}
+#endif
if (fds[i].events & (POLLIN | POLLRDNORM)) {
FD_SET (fds[i].fd, &readfds);