summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 491823ad44..e38d665e6e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -3218,6 +3218,10 @@ make_addrinfo(res0)
}
base = rb_ary_new();
for (res = res0; res; res = res->ai_next) {
+#if defined(AF_INET6) && !defined(INET6) /* workaround for Windows */
+ if (res->ai_addr->sa_family == AF_INET6)
+ continue;
+#endif
ary = ipaddr(res->ai_addr);
rb_ary_push(ary, INT2FIX(res->ai_family));
rb_ary_push(ary, INT2FIX(res->ai_socktype));