From 90f4fcabc2ee729bfac83a103dac0780c37f05fd Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Tue, 9 Jun 2020 15:20:36 +0200 Subject: [PATCH] Revert usage of libc's time() on MINGW Since libc is reverted to msvcrt.dll, we can use classic time() function again. --- bench/bench_time.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/bench_time.rb b/bench/bench_time.rb index 67148460e..aaec64f36 100644 --- a/bench/bench_time.rb +++ b/bench/bench_time.rb @@ -4,7 +4,7 @@ module BenchTime module Posix extend FFI::Library ffi_lib FFI::Library::LIBC - if FFI::Platform.windows? + if RUBY_PLATFORM =~ /mswin/ attach_function :time, :_time64, [ :buffer_out ], :uint64, ignore_error: true else attach_function :time, [ :buffer_out ], :ulong, ignore_error: true