@@ -544,11 +544,11 @@ impl Default for FileTimes {
544544 fn default ( ) -> Self {
545545 // Redox doesn't appear to support `UTIME_OMIT`, so we stub it out here, and always return
546546 // an error in `set_times`.
547- // ESP-IDF does not support `futimens` at all and the behavior for that OS is therefore
547+ // ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore
548548 // the same as for Redox.
549- #[ cfg( any( target_os = "redox" , target_os = "espidf" ) ) ]
549+ #[ cfg( any( target_os = "redox" , target_os = "espidf" , target_os = "horizon" ) ) ]
550550 let omit = libc:: timespec { tv_sec : 0 , tv_nsec : 0 } ;
551- #[ cfg( not( any( target_os = "redox" , target_os = "espidf" ) ) ) ]
551+ #[ cfg( not( any( target_os = "redox" , target_os = "espidf" , target_os = "horizon" ) ) ) ]
552552 let omit = libc:: timespec { tv_sec : 0 , tv_nsec : libc:: UTIME_OMIT as _ } ;
553553 Self ( [ omit; 2 ] )
554554 }
@@ -1079,9 +1079,9 @@ impl File {
10791079
10801080 pub fn set_times ( & self , times : FileTimes ) -> io:: Result < ( ) > {
10811081 cfg_if:: cfg_if! {
1082- if #[ cfg( any( target_os = "redox" , target_os = "espidf" ) ) ] {
1082+ if #[ cfg( any( target_os = "redox" , target_os = "espidf" , target_os = "horizon" ) ) ] {
10831083 // Redox doesn't appear to support `UTIME_OMIT`.
1084- // ESP-IDF does not support `futimens` at all and the behavior for that OS is therefore
1084+ // ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore
10851085 // the same as for Redox.
10861086 drop( times) ;
10871087 Err ( io:: const_io_error!(
0 commit comments