summaryrefslogtreecommitdiff
path: root/network_io/unix/sockaddr.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2015-08-09 04:32:54 +0000
committerPeter Wemm <peter@FreeBSD.org>2015-08-09 04:32:54 +0000
commitdf84d2567179e9d8867957c089683d753016bd75 (patch)
tree22f2e9932cfc8bcfa6f728a311818f18a1f1d80d /network_io/unix/sockaddr.c
parentbc9ddba9ef9abe23eadcdb51b2ce814c00c00639 (diff)
Diffstat (limited to 'network_io/unix/sockaddr.c')
-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 0dd1a2d4518d5..e6d7e0be93d81 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -325,6 +325,16 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
hints.ai_flags = AI_ADDRCONFIG;
}
#endif
+
+#ifdef __MVS__
+ /* z/OS will not return IPv4 address under AF_UNSPEC if any IPv6 results
+ * are returned, w/o AI_ALL.
+ */
+ if (family == APR_UNSPEC) {
+ hints.ai_flags |= AI_ALL;
+ }
+#endif
+
if(hostname == NULL) {
#ifdef AI_PASSIVE
/* If hostname is NULL, assume we are trying to bind to all