ruby-changes:18434
From: usa <ko1@a...>
Date: Wed, 5 Jan 2011 19:09:15 +0900 (JST)
Subject: [ruby-changes:18434] Ruby:r30457 (ruby_1_8): * ext/socket/socket.c (make_addrinfo): skip IPv6 addresses when ruby
usa 2011-01-05 19:09:09 +0900 (Wed, 05 Jan 2011) New Revision: 30457 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30457 Log: * ext/socket/socket.c (make_addrinfo): skip IPv6 addresses when ruby doesn't support IPv6 but system supports it. [ruby-dev:42944] (#4230) Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/ext/socket/socket.c Index: ruby_1_8/ext/socket/socket.c =================================================================== --- ruby_1_8/ext/socket/socket.c (revision 30456) +++ ruby_1_8/ext/socket/socket.c (revision 30457) @@ -3278,6 +3278,10 @@ } 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)); Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 30456) +++ ruby_1_8/ChangeLog (revision 30457) @@ -1,3 +1,9 @@ +Wed Jan 5 19:06:56 2011 NAKAMURA Usaku <usa@r...> + + * ext/socket/socket.c (make_addrinfo): skip IPv6 addresses when ruby + doesn't support IPv6 but system supports it. + [ruby-dev:42944] (#4230) + Sat Jan 1 10:59:11 2011 Nobuyoshi Nakada <nobu@r...> * intern.h (VALUE rb_ary_join): I have never seen this function -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/