libreplace: Bug 8107, Fix poll replacement to become a msleep replacement
authorJoachim Schmitz <schmitz@hp.com>
Mon, 17 Sep 2012 12:26:31 +0000 (05:26 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 17 Sep 2012 22:01:39 +0000 (15:01 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
lib/replace/poll.c

index 95b2f883bf806125f7a5ca48aa1f88dcd19631be..27876bb06706721b2db7682ab7c5f7fcc9df6641 100644 (file)
@@ -46,7 +46,7 @@ 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;
        }