diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-21 03:54:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-21 03:54:19 +0000 |
commit | ae8c770ba5f2cef9e35a44c936eac1401109bfe1 (patch) | |
tree | 7b6a714107dba7ab1a0b380a56010a9ea859ee2e | |
parent | 28e88ce9a45d4355e3d9a5ecd417f8cbe294ca35 (diff) | |
download | bundler-ae8c770ba5f2cef9e35a44c936eac1401109bfe1.tar.gz |
fiddle/extconf.rb: supply 0
* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION
with 3-digit. libffi 3.1 returns just 2-digit.
[ruby-core:62920] [Bug #9897]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/fiddle/extconf.rb | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sat Jun 21 12:50:32 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION + with 3-digit. libffi 3.1 returns just 2-digit. + [ruby-core:62920] [Bug #9897] + Sat Jun 21 07:06:13 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * encoding.c (enc_find): [DOC] never accepted a symbol. diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 2190aa907f..466d77e6dd 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -7,7 +7,8 @@ dir_config 'libffi' 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') |