@@ -544,11 +544,11 @@ impl Default for FileTimes {
544
544
fn default ( ) -> Self {
545
545
// Redox doesn't appear to support `UTIME_OMIT`, so we stub it out here, and always return
546
546
// 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
548
548
// 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" ) ) ]
550
550
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" ) ) ) ]
552
552
let omit = libc:: timespec { tv_sec : 0 , tv_nsec : libc:: UTIME_OMIT as _ } ;
553
553
Self ( [ omit; 2 ] )
554
554
}
@@ -1079,9 +1079,9 @@ impl File {
1079
1079
1080
1080
pub fn set_times ( & self , times : FileTimes ) -> io:: Result < ( ) > {
1081
1081
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" ) ) ] {
1083
1083
// 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
1085
1085
// the same as for Redox.
1086
1086
drop( times) ;
1087
1087
Err ( io:: const_io_error!(
0 commit comments