File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -544,9 +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- #[ cfg( target_os = "redox" ) ]
547+ // ESP-IDF does not support `futimens` at all and the behavior for that OS is therefore
548+ // the same as for Redox.
549+ #[ cfg( any( target_os = "redox" , target_os = "espidf" ) ) ]
548550 let omit = libc:: timespec { tv_sec : 0 , tv_nsec : 0 } ;
549- #[ cfg( not( target_os = "redox" ) ) ]
551+ #[ cfg( not( any ( target_os = "redox" , target_os = "espidf" ) ) ) ]
550552 let omit = libc:: timespec { tv_sec : 0 , tv_nsec : libc:: UTIME_OMIT as _ } ;
551553 Self ( [ omit; 2 ] )
552554 }
@@ -1077,8 +1079,10 @@ impl File {
10771079
10781080 pub fn set_times ( & self , times : FileTimes ) -> io:: Result < ( ) > {
10791081 cfg_if:: cfg_if! {
1080- if #[ cfg( target_os = "redox" ) ] {
1082+ if #[ cfg( any ( target_os = "redox" , target_os = "espidf" ) ) ] {
10811083 // 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
1085+ // the same as for Redox.
10821086 drop( times) ;
10831087 Err ( io:: const_io_error!(
10841088 io:: ErrorKind :: Unsupported ,
You can’t perform that action at this time.
0 commit comments