Fix cast of stx_btime.tv_nsec

This commit is contained in:
oxalica 2019-10-18 10:19:50 +08:00
parent 15cb3e08e3
commit 2ee45c9da2
No known key found for this signature in database
GPG Key ID: CED392DE0C483D00

View File

@ -310,7 +310,7 @@ impl FileAttr {
return if (ext.stx_mask & libc::STATX_BTIME) != 0 {
Ok(SystemTime::from(libc::timespec {
tv_sec: ext.stx_btime.tv_sec as libc::time_t,
tv_nsec: ext.stx_btime.tv_nsec as libc::c_long,
tv_nsec: ext.stx_btime.tv_nsec as _,
}))
} else {
Err(io::Error::new(