@@ -1337,7 +1337,7 @@ impl File {
13371337 // Redox doesn't appear to support `UTIME_OMIT`.
13381338 // ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore
13391339 // 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.
13411341 let _ = times;
13421342 Err ( io:: const_io_error!(
13431343 io:: ErrorKind :: Unsupported ,
@@ -1969,14 +1969,20 @@ pub fn fchown(fd: c_int, uid: u32, gid: u32) -> io::Result<()> {
19691969 Ok ( ( ) )
19701970}
19711971
1972- #[ cfg( not( any ( target_os = "vxworks" ) ) ) ]
1972+ #[ cfg( not( target_os = "vxworks" ) ) ]
19731973pub fn lchown ( path : & Path , uid : u32 , gid : u32 ) -> io:: Result < ( ) > {
19741974 run_path_with_cstr ( path, & |path| {
19751975 cvt ( unsafe { libc:: lchown ( path. as_ptr ( ) , uid as libc:: uid_t , gid as libc:: gid_t ) } )
19761976 . map ( |_| ( ) )
19771977 } )
19781978}
19791979
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+
19801986#[ cfg( not( any( target_os = "fuchsia" , target_os = "vxworks" ) ) ) ]
19811987pub fn chroot ( dir : & Path ) -> io:: Result < ( ) > {
19821988 run_path_with_cstr ( dir, & |dir| cvt ( unsafe { libc:: chroot ( dir. as_ptr ( ) ) } ) . map ( |_| ( ) ) )
0 commit comments