summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 13:53:35 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2009-10-26 13:53:35 +0000
commiteb0c2ecfde798134697b1ad23ef94a83a75fd3e7 (patch)
tree997222306e1af9d42462ba7c61fd40c2a2996ae2
parent4f2123f1059610b4657651dd703e53dff7c616ad (diff)
downloadlibapr-eb0c2ecfde798134697b1ad23ef94a83a75fd3e7.tar.gz
merge r829789 from trunk:
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: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@829801 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poll/unix/port.c5
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) {