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() {
159159 || ( arch == "aarch64" && os == "linux" && abi == Ok ( "ilp32" . to_string ( ) ) ) )
160160 && ( apple
161161 || os == "android"
162+ || ( os == "freebsd" && arch == "x86" )
162163 || os == "haiku"
163164 || env == "gnu"
164165 || ( env == "musl" && arch == "x86" )
Original file line number Diff line number Diff line change @@ -79,11 +79,16 @@ mod tests {
7979 ) ) ]
8080 assert_eq_size ! ( u16 , linux_raw_sys:: general:: __kernel_mode_t) ;
8181
82- // Ensure that seconds fields are 64-bit.
8382 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+ }
8792
8893 // Ensure that file offsets are 64-bit.
8994 assert_eq ! ( some_stat. st_size, 0_i64 ) ;
You can’t perform that action at this time.
0 commit comments