]> andersk Git - openssh.git/blobdiff - atomicio.c
- (dtucker) [sftp-common.c] Wrap include of util.h in an ifdef.
[openssh.git] / atomicio.c
index bb44c32300d368b77f84b9d22adb1c229e34b88b..a6b2d127a9b803a8e4e1c85359d351eaaabecaf9 100644 (file)
@@ -97,8 +97,10 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd,
        /* Make a copy of the iov array because we may modify it below */
        memcpy(iov, _iov, iovcnt * sizeof(*_iov));
 
+#ifndef BROKEN_READV_COMPARISON
        pfd.fd = fd;
        pfd.events = f == readv ? POLLIN : POLLOUT;
+#endif
        for (; iovcnt > 0 && iov[0].iov_len > 0;) {
                res = (f) (fd, iov, iovcnt);
                switch (res) {
@@ -106,7 +108,9 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd,
                        if (errno == EINTR)
                                continue;
                        if (errno == EAGAIN || errno == EWOULDBLOCK) {
+#ifndef BROKEN_READV_COMPARISON
                                (void)poll(&pfd, 1, -1);
+#endif
                                continue;
                        }
                        return 0;
This page took 0.032822 seconds and 4 git commands to generate.