diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-03-17 05:47:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-17 05:47:49 -0400 |
| commit | b3b7a3b8d2bef30c82df92600d0cd7cef460b441 (patch) | |
| tree | 7f8a025daa68f11cca3c59db1f096ded74462a58 /library/std/src/sys/fs | |
| parent | 08dfbf49e30d917c89e49eb14cb3f1e8b8a1c9ef (diff) | |
| parent | bd385f3064f558d4bba19a0447f8b08208915dc9 (diff) | |
Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboet
Add std support to cygwin target
Diffstat (limited to 'library/std/src/sys/fs')
| -rw-r--r-- | library/std/src/sys/fs/unix.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/library/std/src/sys/fs/unix.rs b/library/std/src/sys/fs/unix.rs index d944bc9c9a2..7c3ed8029f7 100644 --- a/library/std/src/sys/fs/unix.rs +++ b/library/std/src/sys/fs/unix.rs @@ -543,7 +543,12 @@ impl FileAttr { SystemTime::new(self.stat.st_atim.tv_sec as i64, self.stat.st_atim.tv_nsec as i64) } - #[cfg(any(target_os = "freebsd", target_os = "openbsd", target_vendor = "apple"))] + #[cfg(any( + target_os = "freebsd", + target_os = "openbsd", + target_vendor = "apple", + target_os = "cygwin", + ))] pub fn created(&self) -> io::Result<SystemTime> { SystemTime::new(self.stat.st_birthtime as i64, self.stat.st_birthtime_nsec as i64) } @@ -553,6 +558,7 @@ impl FileAttr { target_os = "openbsd", target_os = "vita", target_vendor = "apple", + target_os = "cygwin", )))] pub fn created(&self) -> io::Result<SystemTime> { cfg_has_statx! { @@ -960,6 +966,7 @@ impl DirEntry { #[cfg(any( target_os = "linux", + target_os = "cygwin", target_os = "emscripten", target_os = "android", target_os = "solaris", @@ -1220,6 +1227,7 @@ impl File { target_os = "freebsd", target_os = "fuchsia", target_os = "linux", + target_os = "cygwin", target_os = "android", target_os = "netbsd", target_os = "openbsd", @@ -1234,6 +1242,7 @@ impl File { target_os = "fuchsia", target_os = "freebsd", target_os = "linux", + target_os = "cygwin", target_os = "netbsd", target_os = "openbsd", target_os = "nto", |
