summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-21 03:54:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-21 03:54:19 +0000
commitae8c770ba5f2cef9e35a44c936eac1401109bfe1 (patch)
tree7b6a714107dba7ab1a0b380a56010a9ea859ee2e
parent28e88ce9a45d4355e3d9a5ecd417f8cbe294ca35 (diff)
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--ChangeLog6
-rw-r--r--ext/fiddle/extconf.rb3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a8fc47a..2f88414 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 2190aa9..466d77e 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')