mirror of
https://github.com/3proxy/3proxy.git
synced 2026-06-27 11:41:57 +00:00
do not use FD_SETSIZE on Windows
Some checks failed
C/C++ CI Linux / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI Linux / ubuntu-latest (push) Has been cancelled
C/C++ CI MacOS / macos-15 (push) Has been cancelled
C/C++ CI Windows / windows-2022 (push) Has been cancelled
C/C++ CI cmake / macos-15 (push) Has been cancelled
C/C++ CI cmake / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (push) Has been cancelled
C/C++ CI cmake / windows-2022 (push) Has been cancelled
Some checks failed
C/C++ CI Linux / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI Linux / ubuntu-latest (push) Has been cancelled
C/C++ CI MacOS / macos-15 (push) Has been cancelled
C/C++ CI Windows / windows-2022 (push) Has been cancelled
C/C++ CI cmake / macos-15 (push) Has been cancelled
C/C++ CI cmake / ubuntu-24.04-arm (push) Has been cancelled
C/C++ CI cmake / ubuntu-latest (push) Has been cancelled
C/C++ CI cmake / windows-2022 (push) Has been cancelled
This commit is contained in:
parent
d4554cfabd
commit
7c08432a70
1 changed files with 4 additions and 0 deletions
|
|
@ -255,7 +255,9 @@ int
|
|||
FD_ZERO(&writefd);
|
||||
FD_ZERO(&oobfd);
|
||||
for(i=0; i<nfds; i++){
|
||||
#ifndef _WIN32
|
||||
if(fds[i].fd >= FD_SETSIZE) continue;
|
||||
#endif
|
||||
if((fds[i].events&POLLIN))FD_SET(fds[i].fd, &readfd);
|
||||
if((fds[i].events&POLLOUT))FD_SET(fds[i].fd, &writefd);
|
||||
if((fds[i].events&POLLPRI))FD_SET(fds[i].fd, &oobfd);
|
||||
|
|
@ -264,7 +266,9 @@ int
|
|||
}
|
||||
if((num = select(((int)(maxfd))+1, &readfd, &writefd, &oobfd, &tv)) < 1) return num;
|
||||
for(i=0; i<nfds; i++){
|
||||
#ifndef _WIN32
|
||||
if(fds[i].fd >= FD_SETSIZE) continue;
|
||||
#endif
|
||||
if(FD_ISSET(fds[i].fd, &readfd)) fds[i].revents |= POLLIN;
|
||||
if(FD_ISSET(fds[i].fd, &writefd)) fds[i].revents |= POLLOUT;
|
||||
if(FD_ISSET(fds[i].fd, &oobfd)) fds[i].revents |= POLLPRI;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue