summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 0a37a9b..a168404 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