From: "Joachim Schmitz" <jojo@schmitz-digital.de>
To: git@vger.kernel.org
Subject: [PATCH v6 4/4] make poll() work on platforms that can't recv() on a non-socket
Date: Mon, 17 Sep 2012 09:03:53 +0200 [thread overview]
Message-ID: <k36i16$ou1$1@ger.gmane.org> (raw)
In-Reply-To: k36h3i$ihb$1@ger.gmane.org
This way it just got added to gnulib too the other day.
Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
---
compat/poll/poll.c | 5 +++++
1 file changed, 4 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,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;
}
--
1.7.12
next prev parent reply other threads:[~2012-09-17 7:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 6:48 [PATCH v6 0/4] Support non-WIN32 systems lacking poll() Joachim Schmitz
2012-09-17 6:53 ` [PATCH v6 1/4] make poll available for other platforms lacking it Joachim Schmitz
2012-09-17 6:56 ` [PATCH v6 2/4] fix some win32 specific dependencies in poll.c Joachim Schmitz
2012-09-17 7:02 ` [PATCH v6 3/4] poll() exits too early with EFAULT if 1st arg is NULL Joachim Schmitz
2012-09-17 7:03 ` Joachim Schmitz [this message]
2012-09-17 21:03 ` [PATCH v6 0/4] Support non-WIN32 systems lacking poll() Junio C Hamano
2012-09-17 21:10 ` [PATCH v7 " Joachim Schmitz
2012-09-17 21:34 ` Joachim Schmitz
2012-09-17 22:38 ` Junio C Hamano
2012-09-18 6:22 ` Joachim Schmitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='k36i16$ou1$1@ger.gmane.org' \
--to=jojo@schmitz-digital.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).