@@ -1337,7 +1337,7 @@ impl File {
1337
1337
// Redox doesn't appear to support `UTIME_OMIT`.
1338
1338
// ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore
1339
1339
// the same as for Redox.
1340
- // `futimens` and `UTIME_OMIT` are a work in progress for vxworks.
1340
+ // `futimens` and `UTIME_OMIT` are a work in progress for vxworks.
1341
1341
let _ = times;
1342
1342
Err ( io:: const_io_error!(
1343
1343
io:: ErrorKind :: Unsupported ,
@@ -1969,14 +1969,20 @@ pub fn fchown(fd: c_int, uid: u32, gid: u32) -> io::Result<()> {
1969
1969
Ok ( ( ) )
1970
1970
}
1971
1971
1972
- #[ cfg( not( any ( target_os = "vxworks" ) ) ) ]
1972
+ #[ cfg( not( target_os = "vxworks" ) ) ]
1973
1973
pub fn lchown ( path : & Path , uid : u32 , gid : u32 ) -> io:: Result < ( ) > {
1974
1974
run_path_with_cstr ( path, & |path| {
1975
1975
cvt ( unsafe { libc:: lchown ( path. as_ptr ( ) , uid as libc:: uid_t , gid as libc:: gid_t ) } )
1976
1976
. map ( |_| ( ) )
1977
1977
} )
1978
1978
}
1979
1979
1980
+ #[ cfg( target_os = "vxworks" ) ]
1981
+ pub fn lchown ( path : & Path , uid : u32 , gid : u32 ) -> io:: Result < ( ) > {
1982
+ let ( _, _, _) = ( path, uid, gid) ;
1983
+ Err ( io:: const_io_error!( io:: ErrorKind :: Unsupported , "lchown not supported by vxworks" , ) )
1984
+ }
1985
+
1980
1986
#[ cfg( not( any( target_os = "fuchsia" , target_os = "vxworks" ) ) ) ]
1981
1987
pub fn chroot ( dir : & Path ) -> io:: Result < ( ) > {
1982
1988
run_path_with_cstr ( dir, & |dir| cvt ( unsafe { libc:: chroot ( dir. as_ptr ( ) ) } ) . map ( |_| ( ) ) )
0 commit comments