summaryrefslogtreecommitdiff
path: root/ext/socket/sockport.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-12 17:59:45 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-12 17:59:45 +0000
commit370ffc6a2a098ba9e545cfad90013fd7e0b0f8a7 (patch)
tree403e5067f2e86dab4f563d5cef5f56c976e53a00 /ext/socket/sockport.h
parentf0e91e54a35806573b2b1a5ab20b8e0511e29ede (diff)
* ext/socket/extconf.rb: use headers instead of "netdb.h" in checking
getnameinfo() and getaddrinfo() because Windows doesn't have it. see [ruby-dev:37757]. * ext/socket/sockport.h (SA_LEN): use sockaddr_in6 when defined AF_INET6 if INET6 is not defined. winsock2's getaddrinfo() returns sockaddr_in6 if ipv6 is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/sockport.h')
-rw-r--r--ext/socket/sockport.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h
index 1bd7eb698b..a00e5ea34a 100644
--- a/ext/socket/sockport.h
+++ b/ext/socket/sockport.h
@@ -14,7 +14,7 @@
# ifdef HAVE_SA_LEN
# define SA_LEN(sa) (sa)->sa_len
# else
-# ifdef INET6
+# ifdef AF_INET6
# define SA_LEN(sa) \
(((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
: sizeof(struct sockaddr))