summaryrefslogtreecommitdiff
path: root/ext/fiddle/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle/extconf.rb')
-rw-r--r--ext/fiddle/extconf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index d550d23f79..2d85b3eea5 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -63,6 +63,11 @@ unless bundle
end
if have_ffi_header && (have_library('ffi') || have_library('libffi'))
have_libffi = true
+ checking_for("undefined FFI_GO_CLOSURES is used") do
+ if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
+ $defs.push('-DFFI_GO_CLOSURES=0')
+ end
+ end
end
end
@@ -151,7 +156,7 @@ if libffi_version
libffi_version = libffi_version.gsub(/-rc\d+/, '')
libffi_version = (libffi_version.split('.').map(&:to_i) + [0,0])[0,3]
$defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % libffi_version }})
- puts "libffi_version: #{libffi_version.join('.')}"
+ warn "libffi_version: #{libffi_version.join('.')}"
end
case