summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-07 02:44:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-07 02:44:07 +0000
commit7c93e565600f3645659e603161c9ac992184c7d0 (patch)
tree4a5f6b9d268d4ca8786297c98ef162042a1a6f8f /lib
parent0c0f9873760236083a003a70b668fb1ea3473bfa (diff)
* lib/mkmf.rb (have_header): needs dependent headers if trying to
compile. * ext/socket/extconf.rb: net/if.h depends on other headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 2cbbb245a9..2a49b6fc8f 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -808,9 +808,9 @@ end
# For example, if have_header('foo.h') returned true, then the HAVE_FOO_H
# preprocessor macro would be passed to the compiler.
#
-def have_header(header, &b)
+def have_header(header, preheaders = nil, &b)
checking_for header do
- if try_header(cpp_include(header), &b)
+ if try_header(cpp_include(preheaders)+cpp_include(header), &b)
$defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___")))
true
else