make poll() work on platforms that can't recv() on a non-socket
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 <[email protected]>
--- compat/poll/poll.c | 5 +++++ 1 file changed, 5 insertions(+)
compat/poll/poll.c +5 -0
@@ -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; }
Signature · 1 line
1.7.12