File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ fn main() {
159
159
|| ( arch == "aarch64" && os == "linux" && abi == Ok ( "ilp32" . to_string ( ) ) ) )
160
160
&& ( apple
161
161
|| os == "android"
162
+ || ( os == "freebsd" && arch == "x86" )
162
163
|| os == "haiku"
163
164
|| env == "gnu"
164
165
|| ( env == "musl" && arch == "x86" )
Original file line number Diff line number Diff line change @@ -79,11 +79,16 @@ mod tests {
79
79
) ) ]
80
80
assert_eq_size ! ( u16 , linux_raw_sys:: general:: __kernel_mode_t) ;
81
81
82
- // Ensure that seconds fields are 64-bit.
83
82
let some_stat: Stat = unsafe { core:: mem:: zeroed ( ) } ;
84
- assert_eq ! ( some_stat. st_atime, 0_i64 ) ;
85
- assert_eq ! ( some_stat. st_mtime, 0_i64 ) ;
86
- assert_eq ! ( some_stat. st_ctime, 0_i64 ) ;
83
+
84
+ // Ensure that seconds fields are 64-bit on non-y2038-bug platforms, and
85
+ // on Linux where we use statx.
86
+ #[ cfg( any( linux_kernel, not( fix_y2038) ) ) ]
87
+ {
88
+ assert_eq ! ( some_stat. st_atime, 0_i64 ) ;
89
+ assert_eq ! ( some_stat. st_mtime, 0_i64 ) ;
90
+ assert_eq ! ( some_stat. st_ctime, 0_i64 ) ;
91
+ }
87
92
88
93
// Ensure that file offsets are 64-bit.
89
94
assert_eq ! ( some_stat. st_size, 0_i64 ) ;
You can’t perform that action at this time.
0 commit comments