We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 268bbd8 commit 1b51333Copy full SHA for 1b51333
1 file changed
vm/src/stdlib/os.rs
@@ -1523,7 +1523,8 @@ pub(super) mod _os {
1523
let tick_for_second = unsafe { libc::sysconf(libc::_SC_CLK_TCK) } as f64;
1524
let c = unsafe { libc::times(&mut t as *mut _) };
1525
1526
- if c == -1 {
+ // XXX: The signedness of `clock_t` varies from platform to platform.
1527
+ if c == (-1i8) as libc::clock_t {
1528
return Err(vm.new_os_error("Fail to get times".to_string()));
1529
}
1530
0 commit comments