HP NonStop can't recv() on a non-socket, this commit cates for this.
So far for HP NonStop only, via #ifdef __TANDEM, but it may be usefull
for others too. A similar patch got sent to gnulib.
Signed-off-by: Joachim Schmitz <redacted>
---
compat/poll/poll.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compat/poll/poll.c b/compat/poll/poll.c
index e4b8319..10a204e 100644
--- a/compat/poll/poll.c
+++ b/compat/poll/poll.c
@@ -306,6 +306,11 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds)
|| socket_errno == ECONNABORTED || socket_errno == ENETRESET)
happened |= POLLHUP;
+#ifdef __TANDEM /* can't use recv() on non-socket */
+ else if (/* (r == -1) && */ socket_errno == ENOTSOCK)
+ happened |= (POLLIN | POLLRDNORM) & sought;
+#endif
+
else
happened |= POLLERR;
}--
1.7.12