99// Only available on Linux
1010//
1111// spell-checker:ignore CLOEXEC RDONLY TOCTOU closedir dirp fdopendir fstatat openat REMOVEDIR unlinkat smallfile
12- // spell-checker:ignore RAII dirfd fchownat fchown FchmodatFlags fchmodat fchmod
12+ // spell-checker:ignore RAII dirfd fchownat fchown FchmodatFlags fchmodat fchmod atim mtim ctim
1313
1414#[ cfg( test) ]
1515use std:: os:: unix:: ffi:: OsStringExt ;
@@ -471,6 +471,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
471471 fn atime ( & self ) -> i64 {
472472 #[ cfg( target_pointer_width = "32" ) ]
473473 {
474+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
475+ self . stat . st_atim . into ( )
476+
477+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
474478 self . stat . st_atime . into ( )
475479 }
476480 #[ cfg( not( target_pointer_width = "32" ) ) ]
@@ -482,6 +486,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
482486 fn atime_nsec ( & self ) -> i64 {
483487 #[ cfg( target_pointer_width = "32" ) ]
484488 {
489+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
490+ self . stat . st_atim_nsec . into ( )
491+
492+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
485493 self . stat . st_atime_nsec . into ( )
486494 }
487495 #[ cfg( not( target_pointer_width = "32" ) ) ]
@@ -493,6 +501,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
493501 fn mtime ( & self ) -> i64 {
494502 #[ cfg( target_pointer_width = "32" ) ]
495503 {
504+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
505+ self . stat . st_mtim . into ( )
506+
507+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
496508 self . stat . st_mtime . into ( )
497509 }
498510 #[ cfg( not( target_pointer_width = "32" ) ) ]
@@ -504,6 +516,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
504516 fn mtime_nsec ( & self ) -> i64 {
505517 #[ cfg( target_pointer_width = "32" ) ]
506518 {
519+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
520+ self . stat . st_mtim_nsec . into ( )
521+
522+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
507523 self . stat . st_mtime_nsec . into ( )
508524 }
509525 #[ cfg( not( target_pointer_width = "32" ) ) ]
@@ -515,6 +531,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
515531 fn ctime ( & self ) -> i64 {
516532 #[ cfg( target_pointer_width = "32" ) ]
517533 {
534+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
535+ self . stat . st_ctim . into ( )
536+
537+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
518538 self . stat . st_ctime . into ( )
519539 }
520540 #[ cfg( not( target_pointer_width = "32" ) ) ]
@@ -526,6 +546,10 @@ impl std::os::unix::fs::MetadataExt for Metadata {
526546 fn ctime_nsec ( & self ) -> i64 {
527547 #[ cfg( target_pointer_width = "32" ) ]
528548 {
549+ #[ cfg( target_env = "musl" , target_arch = "x86" ) ]
550+ self . stat . st_ctim_nsec . into ( )
551+
552+ #[ cfg( not( target_env = "musl" , target_arch = "x86" ) ) ]
529553 self . stat . st_ctime_nsec . into ( )
530554 }
531555 #[ cfg( not( target_pointer_width = "32" ) ) ]
0 commit comments