From abe07d4bf5f2f848b22e511a647a85c878066adb Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 5 Feb 2024 16:29:56 +0100 Subject: Update to ruby/mspec@31f51e0 --- spec/mspec/lib/mspec/runner/actions/leakchecker.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'spec/mspec/lib/mspec/runner/actions/leakchecker.rb') diff --git a/spec/mspec/lib/mspec/runner/actions/leakchecker.rb b/spec/mspec/lib/mspec/runner/actions/leakchecker.rb index 9cf5cefa3f..71797b9815 100644 --- a/spec/mspec/lib/mspec/runner/actions/leakchecker.rb +++ b/spec/mspec/lib/mspec/runner/actions/leakchecker.rb @@ -345,10 +345,13 @@ class LeakCheckerAction begin libc = Fiddle.dlopen(nil) + # Older versions of fiddle don't have Fiddle::Type (and instead rely on Fiddle::TYPE_) + # Even older versions of fiddle don't have CONST_STRING, + string_type = defined?(Fiddle::TYPE_CONST_STRING) ? Fiddle::TYPE_CONST_STRING : Fiddle::TYPE_VOIDP nss_configure_lookup = Fiddle::Function.new( libc['__nss_configure_lookup'], - [Fiddle::Types::CONST_STRING, Fiddle::Types::CONST_STRING], - Fiddle::Types::INT + [string_type, string_type], + Fiddle::TYPE_INT ) rescue Fiddle::DLError # We're not running with glibc - no need to do this. -- cgit v1.2.3