@@ -13,10 +13,10 @@ This reverts commit fec4818fdb40c82679f57fa7f26fcddc1a874c13.
13
13
3 files changed, 42 insertions(+), 89 deletions(-)
14
14
15
15
diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
16
- index 479bbcc17a8..2e90d8d6be7 100644
16
+ index ab0b2a3eda3..4ac9ae4fd04 100644
17
17
--- a/library/std/src/os/linux/fs.rs
18
18
+++ b/library/std/src/os/linux/fs.rs
19
- @@ -356 ,34 +356 ,19 @@ fn st_size(&self) -> u64 {
19
+ @@ -363 ,34 +363 ,19 @@ fn st_size(&self) -> u64 {
20
20
self.as_inner().as_inner().st_size as u64
21
21
}
22
22
fn st_atime(&self) -> i64 {
@@ -55,10 +55,10 @@ index 479bbcc17a8..2e90d8d6be7 100644
55
55
fn st_ctime_nsec(&self) -> i64 {
56
56
self.as_inner().as_inner().st_ctime_nsec as i64
57
57
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
58
- index 8438d7dcc30..c5ca8582f88 100644
58
+ index 8798aa7061c..1d92664b2e1 100644
59
59
--- a/library/std/src/sys/unix/fs.rs
60
60
+++ b/library/std/src/sys/unix/fs.rs
61
- @@ -98 ,19 +98 ,10 @@ struct StatxExtraFields {
61
+ @@ -117 ,19 +117 ,10 @@ struct StatxExtraFields {
62
62
// This is needed to check if btime is supported by the filesystem.
63
63
stx_mask: u32,
64
64
stx_btime: libc::statx_timestamp,
@@ -80,7 +80,7 @@ index 8438d7dcc30..c5ca8582f88 100644
80
80
unsafe fn try_statx(
81
81
fd: c_int,
82
82
path: *const c_char,
83
- @@ -200 ,13 +191 ,6 @@ fn statx(
83
+ @@ -219 ,13 +210 ,6 @@ fn statx(
84
84
let extra = StatxExtraFields {
85
85
stx_mask: buf.stx_mask,
86
86
stx_btime: buf.stx_btime,
@@ -94,7 +94,7 @@ index 8438d7dcc30..c5ca8582f88 100644
94
94
};
95
95
96
96
Some(Ok(FileAttr { stat, statx_extra_fields: Some(extra) }))
97
- @@ -354 ,36 +338 ,6 @@ impl FileAttr {
97
+ @@ -380 ,36 +364 ,6 @@ impl FileAttr {
98
98
fn from_stat64(stat: stat64) -> Self {
99
99
Self { stat, statx_extra_fields: None }
100
100
}
@@ -131,7 +131,7 @@ index 8438d7dcc30..c5ca8582f88 100644
131
131
}
132
132
} else {
133
133
impl FileAttr {
134
- @@ -409 ,15 +363 ,24 @@ pub fn file_type(&self) -> FileType {
134
+ @@ -435 ,15 +389 ,24 @@ pub fn file_type(&self) -> FileType {
135
135
#[cfg(target_os = "netbsd")]
136
136
impl FileAttr {
137
137
pub fn modified(&self) -> io::Result<SystemTime> {
@@ -159,8 +159,8 @@ index 8438d7dcc30..c5ca8582f88 100644
159
159
}
160
160
}
161
161
162
- @@ -430 ,19 +393 ,18 @@ impl FileAttr {
163
- target_os = "vita"
162
+ @@ -472 ,19 +435 ,18 @@ impl FileAttr {
163
+ target_os = "hurd",
164
164
)))]
165
165
pub fn modified(&self) -> io::Result<SystemTime> {
166
166
- #[cfg(target_pointer_width = "32")]
@@ -186,9 +186,9 @@ index 8438d7dcc30..c5ca8582f88 100644
186
186
+ }))
187
187
}
188
188
189
- #[cfg(target_os = "horizon")]
190
- @@ -457 ,19 +419 ,18 @@ pub fn modified(&self) -> io::Result<SystemTime> {
191
- target_os = "vita"
189
+ #[cfg(any( target_os = "horizon", target_os = "hurd") )]
190
+ @@ -500 ,19 +462 ,18 @@ pub fn modified(&self) -> io::Result<SystemTime> {
191
+ target_os = "hurd",
192
192
)))]
193
193
pub fn accessed(&self) -> io::Result<SystemTime> {
194
194
- #[cfg(target_pointer_width = "32")]
@@ -214,8 +214,8 @@ index 8438d7dcc30..c5ca8582f88 100644
214
214
+ }))
215
215
}
216
216
217
- #[cfg(target_os = "horizon")]
218
- @@ -486 ,7 +447 ,10 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
217
+ #[cfg(any( target_os = "horizon", target_os = "hurd") )]
218
+ @@ -529 ,7 +490 ,10 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
219
219
target_os = "watchos",
220
220
))]
221
221
pub fn created(&self) -> io::Result<SystemTime> {
@@ -227,7 +227,7 @@ index 8438d7dcc30..c5ca8582f88 100644
227
227
}
228
228
229
229
#[cfg(not(any(
230
- @@ -502 ,7 +466 ,10 @@ pub fn created(&self) -> io::Result<SystemTime> {
230
+ @@ -545 ,7 +509 ,10 @@ pub fn created(&self) -> io::Result<SystemTime> {
231
231
cfg_has_statx! {
232
232
if let Some(ext) = &self.statx_extra_fields {
233
233
return if (ext.stx_mask & libc::STATX_BTIME) != 0 {
@@ -240,17 +240,17 @@ index 8438d7dcc30..c5ca8582f88 100644
240
240
Err(io::const_io_error!(
241
241
io::ErrorKind::Uncategorized,
242
242
diff --git a/library/std/src/sys/unix/time.rs b/library/std/src/sys/unix/time.rs
243
- index 17b4130c202..4e8dd9a86e7 100644
243
+ index f2e86a4fb2b..fee9e07ec01 100644
244
244
--- a/library/std/src/sys/unix/time.rs
245
245
+++ b/library/std/src/sys/unix/time.rs
246
- @@ -36 ,6 +36 ,7 @@ pub(in crate::sys::unix) struct Timespec {
246
+ @@ -34 ,6 +34 ,7 @@ pub(in crate::sys::unix) struct Timespec {
247
247
248
248
impl SystemTime {
249
- #[cfg_attr(target_os = "horizon", allow(unused))]
249
+ #[cfg_attr(any( target_os = "horizon", target_os = "hurd") , allow(unused))]
250
250
+ #[cfg_attr(target_env = "gnu", allow(dead_code))]
251
251
pub fn new(tv_sec: i64, tv_nsec: i64) -> SystemTime {
252
252
SystemTime { t: Timespec::new(tv_sec, tv_nsec) }
253
253
}
254
254
- -
255
- 2.42 .0
255
+ 2.43 .0
256
256
0 commit comments