diff options
| author | Ian Chamberlain <ian.h.chamberlain@gmail.com> | 2022-02-14 20:55:01 -0500 |
|---|---|---|
| committer | Mark Drobnak <mark.drobnak@gmail.com> | 2022-06-13 20:44:58 -0700 |
| commit | a49d14f08914390f24fa0ba6401b5f1de91939fc (patch) | |
| tree | 7e3e3c8f379287b21e69fa465d97181b52190c68 /library/std/src/sys | |
| parent | 19f68a272912beaa68cb6c172e16ee6f21e96bf8 (diff) | |
| download | rust-a49d14f08914390f24fa0ba6401b5f1de91939fc.tar.gz rust-a49d14f08914390f24fa0ba6401b5f1de91939fc.zip | |
Update libc::stat field names
See https://github.com/Meziu/rust-horizon/pull/14
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/fs.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs index 4dda3c3f813..8b0bbd6a55c 100644 --- a/library/std/src/sys/unix/fs.rs +++ b/library/std/src/sys/unix/fs.rs @@ -429,11 +429,16 @@ impl FileAttr { Ok(SystemTime::new(self.stat.st_atime as i64, self.stat.st_atime_nsec as i64)) } - #[cfg(any(target_os = "vxworks", target_os = "espidf", target_os = "horizon"))] + #[cfg(any(target_os = "vxworks", target_os = "espidf"))] pub fn accessed(&self) -> io::Result<SystemTime> { Ok(SystemTime::new(self.stat.st_atime as i64, 0)) } + #[cfg(target_os = "horizon")] + pub fn accessed(&self) -> io::Result<SystemTime> { + Ok(SystemTime::from(self.stat.st_atim)) + } + #[cfg(any( target_os = "freebsd", target_os = "openbsd", |
