aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-05-13 08:39:50 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-05-13 08:42:48 +0900
commit9cfa811b0f209d714f89fe0de6778c71f77556c7 (patch)
tree721933099d85156503c090be76da237ced3d925d /ext
parent777b5b4f3959ebd1a0b2601324a1f4fa452ca166 (diff)
downloadruby-9cfa811b0f209d714f89fe0de6778c71f77556c7.tar.gz
Do not try ffi_closure_alloc if libffi is <= 3.1
Maybe due to e1855100e46040e73630b378974c17764e0cccee, CentOS, RHEL, and Fedora CIs have started failing with SEGV. Try to avoid ffi_closure_alloc on those environments. https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora32/ruby-master/log/20200512T183004Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200512T183003Z.fail.html.gz
Diffstat (limited to 'ext')
-rw-r--r--ext/fiddle/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 120c4ce7b4..35e5a312ab 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -122,6 +122,7 @@ end
case
when $mswin, $mingw, (ver && (ver <=> [3, 2]) >= 0)
$defs << "-DUSE_FFI_CLOSURE_ALLOC=1"
+when (ver && (ver <=> [3, 1]) <= 0)
else
have_func('ffi_closure_alloc', ffi_header)
end