ruby/ruby-r46485-libffi31.patch

15 lines
562 B
Diff

Index: ext/fiddle/extconf.rb
===================================================================
--- ext/fiddle/extconf.rb (revision 46484)
+++ ext/fiddle/extconf.rb (revision 46485)
@@ -7,7 +7,8 @@
pkg_config("libffi")
if ver = pkg_config("libffi", "modversion")
ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
+ ver = (ver.split('.') + [0,0])[0,3]
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
end
unless have_header('ffi.h')