aboutsummaryrefslogtreecommitdiffstats
path: root/test/fiddle/test_func.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/fiddle/test_func.rb')
-rw-r--r--test/fiddle/test_func.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/fiddle/test_func.rb b/test/fiddle/test_func.rb
index 376f8786da..cf71a4b123 100644
--- a/test/fiddle/test_func.rb
+++ b/test/fiddle/test_func.rb
@@ -86,7 +86,12 @@ module Fiddle
else
snprintf_name = "snprintf"
end
- snprintf = Function.new(@libc[snprintf_name],
+ begin
+ snprintf_pointer = @libc[snprintf_name]
+ rescue Fiddle::DLError
+ skip "Can't find #{snprintf_name}: #{$!.message}"
+ end
+ snprintf = Function.new(snprintf_pointer,
[
TYPE_VOIDP,
TYPE_SIZE_T,