diff -urN ruby-1.9.3-p0.orig/ext/socket/extconf.rb ruby-1.9.3-p0/ext/socket/extconf.rb
--- ruby-1.9.3-p0.orig/ext/socket/extconf.rb	2011-07-24 13:35:56.000000000 +0200
+++ ruby-1.9.3-p0/ext/socket/extconf.rb	2011-12-18 10:02:40.505529116 +0100
@@ -36,62 +36,6 @@
 end
 
 ipv6 = false
-default_ipv6 = /mswin|cygwin|beos|haiku/ !~ RUBY_PLATFORM
-if enable_config("ipv6", default_ipv6)
-  if checking_for("ipv6") {try_link(<<EOF)}
-#include <sys/types.h>
-#ifndef _WIN32
-#include <sys/socket.h>
-#endif
-int
-main()
-{
-  socket(AF_INET6, SOCK_STREAM, 0);
-}
-EOF
-    $defs << "-DENABLE_IPV6" << "-DINET6"
-    ipv6 = true
-  end
-end
-
-if ipv6
-  if $mingw
-    $CPPFLAGS << " -D_WIN32_WINNT=0x501"
-  end
-  ipv6lib = nil
-  class << (fmt = "unknown")
-    def %(s) s || self end
-  end
-  idirs, ldirs = dir_config("inet6", %w[/usr/inet6 /usr/local/v6].find {|d| File.directory?(d)})
-  checking_for("ipv6 type", fmt) do
-    if have_macro("IPV6_INRIA_VERSION", "netinet/in.h")
-      "inria"
-    elsif have_macro("__KAME__", "netinet/in.h")
-      have_library(ipv6lib = "inet6")
-      "kame"
-    elsif have_macro("_TOSHIBA_INET6", "sys/param.h")
-      have_library(ipv6lib = "inet6") and "toshiba"
-    elsif have_macro("__V6D__", "sys/v6config.h")
-      have_library(ipv6lib = "v6") and "v6d"
-    elsif have_macro("_ZETA_MINAMI_INET6", "sys/param.h")
-      have_library(ipv6lib = "inet6") and "zeta"
-    elsif ipv6lib = with_config("ipv6-lib")
-      warn <<EOS
---with-ipv6-lib and --with-ipv6-libdir option will be obsolete, use
---with-inet6lib and --with-inet6-{include,lib} options instead.
-EOS
-      find_library(ipv6lib, nil, with_config("ipv6-libdir", ldirs)) and
-        ipv6lib
-    elsif have_library("inet6")
-      "inet6"
-    end
-  end or not ipv6lib or abort <<EOS
-
-Fatal: no #{ipv6lib} library found.  cannot continue.
-You need to fetch lib#{ipv6lib}.a from appropriate
-ipv6 kit and compile beforehand.
-EOS
-end
 
 if have_struct_member("struct sockaddr_in", "sin_len", headers)
   $defs[-1] = "-DHAVE_SIN_LEN"
