summaryrefslogtreecommitdiffstats
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 22:58:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 22:58:03 +0000
commit0c404f36f99c483508921466501bdb1ca05dcbb4 (patch)
tree3db23441824ea2e2b2ff53f986806451ff19b2c9 /ext/socket/ancdata.c
parent5d5c9b4b094bd3c5a7f1117319f105c4e6697327 (diff)
downloadruby-0c404f36f99c483508921466501bdb1ca05dcbb4.tar.gz
ruby-0c404f36f99c483508921466501bdb1ca05dcbb4.tar.xz
ruby-0c404f36f99c483508921466501bdb1ca05dcbb4.zip
* ext/socket/extconf.rb (in_pktinfo, in6_pktinfo),
ext/socket/ancdata.c: defined in w32api/ws2tcpip.h on cygwin but cannot compile for some reason. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 5cc5c49d9..d62f0e558 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -188,7 +188,7 @@ ancillary_int(VALUE self)
static VALUE
ancillary_s_ip_pktinfo(VALUE self, VALUE v_addr, VALUE v_ifindex, VALUE v_spec_dst)
{
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
unsigned int ifindex;
struct sockaddr_in sa;
struct in_pktinfo pktinfo;
@@ -226,7 +226,7 @@ ancillary_s_ip_pktinfo(VALUE self, VALUE v_addr, VALUE v_ifindex, VALUE v_spec_d
static VALUE
ancillary_ip_pktinfo(VALUE self)
{
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
int level, type;
VALUE data;
struct in_pktinfo pktinfo;
@@ -397,7 +397,7 @@ anc_inspect_ip_recvdstaddr(int level, int type, VALUE data, VALUE ret)
}
#endif
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
static int
anc_inspect_ip_pktinfo(int level, int type, VALUE data, VALUE ret)
{
@@ -426,7 +426,7 @@ anc_inspect_ip_pktinfo(int level, int type, VALUE data, VALUE ret)
}
#endif
-#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO) /* IPv6 RFC3542 */
+#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN6_PKTINFO) /* IPv6 RFC3542 */
static int
anc_inspect_ipv6_pktinfo(int level, int type, VALUE data, VALUE ret)
{
@@ -508,7 +508,7 @@ ancillary_inspect(VALUE self)
# if defined(IP_RECVDSTADDR) /* 4.4BSD */
case IP_RECVDSTADDR: if (anc_inspect_ip_recvdstaddr(level, type, data, ret) == -1) goto dump; break;
# endif
-# if defined(IP_PKTINFO) /* GNU/Linux */
+# if defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) /* GNU/Linux */
case IP_PKTINFO: if (anc_inspect_ip_pktinfo(level, type, data, ret) == -1) goto dump; break;
# endif
default: goto dump;