Skip to content

Commit

Permalink
Check TYPE_VARIADIC
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Jul 28, 2021
1 parent cd09f73 commit 8e62e46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/reline/terminfo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def self.curses_dl
else
fiddle_supports_variadic = false
end
if fiddle_supports_variadic and Fiddle.const_defined?(:TYPE_VARIADIC)
# If the libffi version is not 3.0.5 or higher, there isn't TYPE_VARIADIC.
fiddle_supports_variadic = false
end
if fiddle_supports_variadic
%w[libncursesw.so libcursesw.so libncurses.so libcurses.so].each do |curses_name|
result = Fiddle::Handle.new(curses_name)
Expand Down

0 comments on commit 8e62e46

Please sign in to comment.