summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/atomicio.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2014-02-27 17:29:02 +0000
committerdes <des@FreeBSD.org>2014-02-27 17:29:02 +0000
commit255d8413daf4c3747aeb37e6a71bf2771beed29d (patch)
tree28087af50eaf299f287c7fe4b7050c317771c89e /crypto/openssh/atomicio.c
parentea1005cca47f4d3aace134a0acd6809943e46acc (diff)
downloadFreeBSD-src-255d8413daf4c3747aeb37e6a71bf2771beed29d.zip
FreeBSD-src-255d8413daf4c3747aeb37e6a71bf2771beed29d.tar.gz
MFH (r261320): upgrade openssh to 6.5p1
MFH (r261340): enable sandboxing by default
Diffstat (limited to 'crypto/openssh/atomicio.c')
-rw-r--r--crypto/openssh/atomicio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/openssh/atomicio.c b/crypto/openssh/atomicio.c
index 601b3c3..2bac36c 100644
--- a/crypto/openssh/atomicio.c
+++ b/crypto/openssh/atomicio.c
@@ -56,8 +56,10 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
ssize_t res;
struct pollfd pfd;
+#ifndef BROKEN_READ_COMPARISON
pfd.fd = fd;
pfd.events = f == read ? POLLIN : POLLOUT;
+#endif
while (n > pos) {
res = (f) (fd, s + pos, n - pos);
switch (res) {
@@ -65,7 +67,9 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n,
if (errno == EINTR)
continue;
if (errno == EAGAIN || errno == EWOULDBLOCK) {
+#ifndef BROKEN_READ_COMPARISON
(void)poll(&pfd, 1, -1);
+#endif
continue;
}
return 0;
OpenPOWER on IntegriCloud