Skip to content

Commit e76c43b

Browse files
committed
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.
1 parent 9b4a9e4 commit e76c43b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/ffi_c/extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def system_libffi_usable?
3939
have_header('shlwapi.h')
4040
have_func('rb_thread_call_without_gvl') || abort("Ruby C-API function `rb_thread_call_without_gvl` is missing")
4141
have_func('ruby_native_thread_p')
42-
if RbConfig::CONFIG['host_os'].downcase !~ /darwin/ || RUBY_VERSION >= "2.3.0"
43-
# On OSX ruby_thread_has_gvl_p is detected but fails at runtime for ruby < 2.3.0
42+
if RUBY_VERSION >= "2.3.0"
43+
# On OSX and Linux ruby_thread_has_gvl_p() is detected but fails at runtime for ruby < 2.3.0
4444
have_func('ruby_thread_has_gvl_p')
4545
end
4646

0 commit comments

Comments
 (0)