summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-22 08:42:12 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-22 08:42:12 +0000
commit17a6f1f68c3910624b9db7911d3a04f1ed014a9c (patch)
tree3508d7b9d95ad6967501f3c62b7a94c3618c9cdb /ext
parentc99bac4835e3a4620d570d83b2aa182b0358e04c (diff)
downloadruby-17a6f1f68c3910624b9db7911d3a04f1ed014a9c.tar.gz
ruby-17a6f1f68c3910624b9db7911d3a04f1ed014a9c.tar.xz
ruby-17a6f1f68c3910624b9db7911d3a04f1ed014a9c.zip
* ext/socket/ipsocket.c (init_inetsock_internal): drop IPv6 addresses
if INET6 is not defined. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/ipsocket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index 78c85766e..35025803a 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -58,6 +58,10 @@ init_inetsock_internal(struct inetsock_arg *arg)
arg->fd = fd = -1;
for (res = arg->remote.res; res; res = res->ai_next) {
+#if !defined(INET6) && defined(AF_INET6)
+ if (res->ai_family == AF_INET6)
+ continue;
+#endif
status = rsock_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
syscall = "socket(2)";
fd = status;