| 394 | } |
| 395 | |
| 396 | int |
| 397 | select(int nfds, fd_set *readfds, fd_set *writefds, |
| 398 | fd_set *exceptfds, struct timeval *timeout) |
| 399 | { |
| 400 | if (unlikely(inited == 0)) { |
| 401 | INIT_FUNCTION(select); |
| 402 | return real_select(nfds, readfds, writefds, exceptfds, timeout); |
| 403 | } |
| 404 | |
| 405 | if (ff_fdisused(nfds)) { |
| 406 | struct timeval tv; |
| 407 | tv.tv_sec = 0; |
| 408 | tv.tv_usec = 0; |
| 409 | return ff_select(nfds, readfds, writefds, exceptfds, &tv); |
| 410 | } else { |
| 411 | return real_select(nfds, readfds, writefds, exceptfds, timeout); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | #pragma GCC diagnostic pop |
| 416 | |