summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2020-06-05 19:22:51 +0200
committerGitHub <noreply@github.com>2020-06-05 19:22:51 +0200
commit81dad3c38a8f217f5d9f305b5dddb43c6a09f0ee (patch)
tree771e286ff0677ec7afce20d3461c6106929546b8
parent2c3979e032c52980b9bf7bcc9b3ab117796d8ad1 (diff)
parent440f336c9a7f2269f57b6fbf3c529e1db3e21f76 (diff)
downloadffi-81dad3c38a8f217f5d9f305b5dddb43c6a09f0ee.tar.gz
Merge pull request #787 from larskanis/ffi_prep_closure_loc
Test for ffi_prep_closure_loc() to make sure we can use this function
-rw-r--r--ext/ffi_c/extconf.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb
index a9c7a07..6dd28aa 100644
--- a/ext/ffi_c/extconf.rb
+++ b/ext/ffi_c/extconf.rb
@@ -13,18 +13,17 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi") ||
(find_header("ffi.h", `xcrun --sdk macosx --show-sdk-path`.strip + "/usr/include/ffi") rescue false)
- # Ensure we can link to ffi_call
- libffi_ok &&= have_library("ffi", "ffi_call", [ "ffi.h" ]) ||
- have_library("libffi", "ffi_call", [ "ffi.h" ]) ||
- have_library("libffi-8", "ffi_call", [ "ffi.h" ])
+ # Ensure we can link to ffi_prep_closure_loc
+ libffi_ok &&= have_library("ffi", "ffi_prep_closure_loc", [ "ffi.h" ]) ||
+ have_library("libffi", "ffi_prep_closure_loc", [ "ffi.h" ]) ||
+ have_library("libffi-8", "ffi_prep_closure_loc", [ "ffi.h" ])
if RbConfig::CONFIG['host_os'] =~ /mswin/
have_library('libffi_convenience')
have_library('shlwapi')
end
- # And we need a libffi version recent enough to provide ffi_closure_alloc
- libffi_ok &&= have_func("ffi_closure_alloc")
+ libffi_ok
end
dir_config("ffi_c")