From e76c43b3efaa24563e6c93dd8f0128240197a88c Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Sat, 18 May 2019 10:16:59 +0200 Subject: [PATCH] Fix build on ruby-2.0 on Linux ruby_thread_has_gvl_p() is detected in extconf.rb but fails to link at runtime. This already happened on Mac-OS. --- ext/ffi_c/extconf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb index f1bb035db..84da540da 100644 --- a/ext/ffi_c/extconf.rb +++ b/ext/ffi_c/extconf.rb @@ -39,8 +39,8 @@ def system_libffi_usable? have_header('shlwapi.h') have_func('rb_thread_call_without_gvl') || abort("Ruby C-API function `rb_thread_call_without_gvl` is missing") have_func('ruby_native_thread_p') - if RbConfig::CONFIG['host_os'].downcase !~ /darwin/ || RUBY_VERSION >= "2.3.0" - # On OSX ruby_thread_has_gvl_p is detected but fails at runtime for ruby < 2.3.0 + if RUBY_VERSION >= "2.3.0" + # On OSX and Linux ruby_thread_has_gvl_p() is detected but fails at runtime for ruby < 2.3.0 have_func('ruby_thread_has_gvl_p') end