summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-15 03:36:05 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-15 03:36:05 +0000
commita60e2e58206c779929a29fe0dd6d73cab4031487 (patch)
tree05607e6ff194475f7101fcc192c4fdaa69b6d09e /ext
parent0cc9cea3b4606cbb8c51118c447067245b79c68c (diff)
* ext/socket/extconf.rb: test struct sockaddr_storage directly.
* ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/extconf.rb2
-rw-r--r--ext/socket/rubysocket.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index eff2d3f..5320db6 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -54,6 +54,8 @@ have_header("sys/uio.h")
have_header("ucred.h", headers)
+have_type("struct sockaddr_storage", headers)
+
have_type("struct addrinfo", headers)
have_type("socklen_t", headers)
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 4ed0242..50f1698 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -125,7 +125,7 @@ typedef int socklen_t;
# define IN6_IS_ADDR_UNIQUE_LOCAL(a) (((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd))
#endif
-#ifndef HAVE_SOCKADDR_STORAGE
+#ifndef HAVE_TYPE_STRUCT_SOCKADDR_STORAGE
/*
* RFC 2553: protocol-independent placeholder for socket addresses
*/