summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-09-09 19:45:01 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2003-09-09 19:45:01 +0000
commitbd9466994218ec15a0135e96a0371d5fd8ee809e (patch)
treedb8c5b8d12349466d8d10e1529a1f0e2f156423e /network_io
parent88dce0bd9c905368144e72be93a98e577f89483a (diff)
downloadlibapr-bd9466994218ec15a0135e96a0371d5fd8ee809e.tar.gz
work around a problem in current AIX getaddrinfo()
it wasn't needed in previous releases of APR or Apache because we didn't call the resolver when hostname was NULL git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@64615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/sockaddr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index 765252b2e..9f9bb85ed 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -391,6 +391,16 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
/* getaddrinfo according to RFC 2553 must have either hostname
* or servname non-NULL.
*/
+#ifdef _AIX
+ /* But current AIX getaddrinfo() doesn't like servname = "0";
+ * the "1" won't hurt since we use the port parameter to fill
+ * in the returned socket addresses later
+ */
+ if (!port) {
+ servname = "1";
+ }
+ else
+#endif
servname = apr_itoa(p, port);
}
error = getaddrinfo(hostname, servname, &hints, &ai_list);