diff options
author | Jeff Trawick <trawick@apache.org> | 2009-10-26 13:31:43 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2009-10-26 13:31:43 +0000 |
commit | 2eec938ce9aa992c78ad2095743e13fdb280537f (patch) | |
tree | 3a42250df6eb31fa8153ebc6747be26a1880514b /poll | |
parent | bb773f8ff45eb868dff4f52da6551e2902551147 (diff) | |
download | apr-2eec938ce9aa992c78ad2095743e13fdb280537f.tar.gz |
Work around bogus return code in some circumstances with 32-bit
port_getn() on Solaris 10 x86.
AFAICT this problem only occurs when the return code should be
zero, so changing the return code check should be sufficient.
APR 1.3.8 wasn't affected.
PR: 48029
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@829789 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r-- | poll/unix/port.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/poll/unix/port.c b/poll/unix/port.c index 6e33196de..1d2613df1 100644 --- a/poll/unix/port.c +++ b/poll/unix/port.c @@ -104,8 +104,11 @@ static apr_status_t call_port_getn(int port, port_event_t list[], } ret = port_getn(port, list, max, nget, tvptr); + /* Note: 32-bit port_getn() on Solaris 10 x86 returns large negative + * values instead of 0 when returning immediately. + */ - if (ret < 0) { + if (ret == -1) { rv = apr_get_netos_error(); switch(rv) { |