Skip to content

Commit

Permalink
Fix build on ruby-2.0 on Linux
Browse files Browse the repository at this point in the history
ruby_thread_has_gvl_p() is detected in extconf.rb but fails to link at runtime.
This already happened on Mac-OS.
  • Loading branch information
larskanis committed May 18, 2019
1 parent 9b4a9e4 commit e76c43b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/ffi_c/extconf.rb
Expand Up @@ -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

Expand Down

0 comments on commit e76c43b

Please sign in to comment.