From f12df1a7528a89ddc49a8791be2ae194fba842f3 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 8 Apr 2013 17:42:48 +0000 Subject: [PATCH] socket/extconf.rb: check struct in_addr6 * ext/socket/extconf.rb: check struct in_addr6, which is defined in VC6 instead of in6_addr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- ext/socket/extconf.rb | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8eada109c0..4b3f158900 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Tue Apr 9 02:40:53 2013 Nobuyoshi Nakada +Tue Apr 9 02:42:44 2013 Nobuyoshi Nakada + + * ext/socket/extconf.rb: check struct in_addr6, which is defined in + VC6 instead of in6_addr. * ext/socket/option.c (optname_to_sym): fix macro name. diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 0a37a9b7c5..a168404ae3 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -477,6 +477,10 @@ EOS if getaddr_info_ok == :wide or !have_func("getnameinfo", headers) or !have_func("getaddrinfo", headers) + if !have_type("struct in6_addr", headers) and have_type("struct in_addr6", headers) + $defs.pop(2) + $defs << "-Din_addr6=in6_addr" + end if have_struct_member("struct in6_addr", "s6_addr8", headers) $defs[-1] = "s6_addr=s6_addr8" end