summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-03 16:29:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-03 16:29:23 +0000
commit20ac101daea286f23801789d40635722cc68cfde (patch)
treee362feb15b58747dcfb7291d35fc867cbee71eef /ext/socket/extconf.rb
parentc07b4ef145993f89d4a9baf36781fcb08112a3ac (diff)
* ext/socket/extconf.rb: fix struct in_pktinfo and struct in6_pktinfo
detection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index f4d9206..d610657 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -299,13 +299,13 @@ end
have_header("sys/un.h")
have_header("sys/uio.h")
-have_type("struct in_pktinfo") {|src|
+have_type("struct in_pktinfo", headers) {|src|
src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IP) && defined(IP_PKTINFO)") <<
- "#else\n" << "#error\n" << ">>>>>> no in_pktinfo <<<<<<\n" << "#endif\n"
+ "#else\n" << "#error no in_pktinfo\n" << "#endif\n"
}
-have_type("struct in6_pktinfo") {|src|
+have_type("struct in6_pktinfo", headers) {|src|
src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
- "#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
+ "#else\n" << "#error no in6_pktinfo\n" << "#endif\n"
}
$distcleanfiles << "constants.h" << "constdefs.*"