summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/socket/extconf.rb2
-rw-r--r--ext/socket/rubysocket.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6951902..d9a82fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Feb 15 12:34:58 2013 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/extconf.rb: test struct sockaddr_storage directly.
+
+ * ext/socket/rubysocket.h: use HAVE_TYPE_STRUCT_SOCKADDR_STORAGE.
+
Fri Feb 15 12:26:13 2013 Tanaka Akira <akr@fsij.org>
* ext/socket/getaddrinfo.c (GET_AI): don't cast 1st argument for
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
*/