summaryrefslogtreecommitdiff
path: root/gnulib/lib/poll.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-10-26 08:31:59 +0200
committerGuido Günther <agx@sigxcpu.org>2012-10-26 08:31:59 +0200
commit51182d6cdf2e21fdecff1c203dbdc0823c848247 (patch)
tree433e368f3a1cb4831b2bb61cb4e50e70a4a68412 /gnulib/lib/poll.c
parent8d5672320b92b05f1fbc15c1a6813ef466e1f8fc (diff)
New upstream version 1.0.0~rc1
Diffstat (limited to 'gnulib/lib/poll.c')
-rw-r--r--gnulib/lib/poll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gnulib/lib/poll.c b/gnulib/lib/poll.c
index c200fe2be..c84893a8a 100644
--- a/gnulib/lib/poll.c
+++ b/gnulib/lib/poll.c
@@ -303,6 +303,10 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds)
|| socket_errno == ECONNABORTED || socket_errno == ENETRESET)
happened |= POLLHUP;
+ /* some systems can't use recv() on non-socket, including HP NonStop */
+ else if (socket_errno == ENOTSOCK)
+ happened |= (POLLIN | POLLRDNORM) & sought;
+
else
happened |= POLLERR;
}
@@ -350,7 +354,7 @@ poll (struct pollfd *pfd, nfds_t nfd, int timeout)
/* EFAULT is not necessary to implement, but let's do it in the
simplest case. */
- if (!pfd)
+ if (!pfd && nfd)
{
errno = EFAULT;
return -1;