| 209 | #endif /* !HAVE_GETADDRINFO || HAVE_WINSOCK2_H */ |
| 210 | |
| 211 | int ff_socket_nonblock(int socket, int enable) |
| 212 | { |
| 213 | #if HAVE_WINSOCK2_H |
| 214 | u_long param = enable; |
| 215 | return ioctlsocket(socket, FIONBIO, ¶m); |
| 216 | #else |
| 217 | if (enable) |
| 218 | return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) | O_NONBLOCK); |
| 219 | else |
| 220 | return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) & ~O_NONBLOCK); |
| 221 | #endif /* HAVE_WINSOCK2_H */ |
| 222 | } |
| 223 | |
| 224 | #if !HAVE_POLL_H |
| 225 | int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout) |
no outgoing calls
no test coverage detected