summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-07-05 09:36:58 +1000
committerDamien Miller <djm@mindrot.org>2008-07-05 09:36:58 +1000
commit20d16947190d17f9ed8db983bee6cb7bd20722b5 (patch)
tree4048846ae4e22af8cb180200890386cb83e24308
parent22989f1b5e845830abb2f0598907a9894e9fcb4b (diff)
- (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for
Tru64. readv doesn't seem to be a comparable object there. bz#1386, patch from dtucker@ ok me
-rw-r--r--ChangeLog5
-rw-r--r--atomicio.c4
-rw-r--r--configure.ac5
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 515bd918..c1df7b87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
- (djm) [auth.c] Fixed test for locked account on HP/UX with shadowed
passwords disabled. bz#1083 report & patch from senthilkumar_sen AT
hotpop.com, w/ dtucker@
+ - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for
+ Tru64. readv doesn't seem to be a comparable object there.
+ bz#1386, patch from dtucker@ ok me
20080704
- (dtucker) OpenBSD CVS Sync
@@ -4575,4 +4578,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.5059 2008/07/04 22:59:43 djm Exp $
+$Id: ChangeLog,v 1.5060 2008/07/04 23:36:58 djm Exp $
diff --git a/atomicio.c b/atomicio.c
index bb44c323..a6b2d127 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -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;
diff --git a/configure.ac b/configure.ac
index eb71a879..330b0eb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.406 2008/06/15 16:27:48 dtucker Exp $
+# $Id: configure.ac,v 1.407 2008/07/04 23:36:58 djm Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
-AC_REVISION($Revision: 1.406 $)
+AC_REVISION($Revision: 1.407 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@@ -841,6 +841,7 @@ mips-sony-bsd|mips-sony-newsos4)
AC_DEFINE(SETEUID_BREAKS_SETUID)
AC_DEFINE(BROKEN_SETREUID)
AC_DEFINE(BROKEN_SETREGID)
+ AC_DEFINE(BROKEN_READV_COMPARISON, 1, [Can't do comparisons on readv]))
;;
*-*-nto-qnx*)