#include "replace.h"
#include "system/select.h"
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_IOCTL
+#include <sys/ioctl.h>
+#endif
int rep_poll(struct pollfd *fds, nfds_t nfds, int timeout)
int rc;
nfds_t i;
- if (fds == NULL) {
+ if ((fds == NULL) && (nfds != 0)) {
errno = EFAULT;
return -1;
}