Skip to content

Commit 3234537

Browse files
author
B I Mohammed Abbas
committed
Skip lchown function for vxworks
1 parent 6519c14 commit 3234537

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/std/src/os/unix/fs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,7 @@ pub fn fchown<F: AsFd>(fd: F, uid: Option<u32>, gid: Option<u32>) -> io::Result<
10401040
/// }
10411041
/// ```
10421042
#[stable(feature = "unix_chown", since = "1.73.0")]
1043+
#[cfg(not(any(target_os = "vxworks")))]
10431044
pub fn lchown<P: AsRef<Path>>(dir: P, uid: Option<u32>, gid: Option<u32>) -> io::Result<()> {
10441045
sys::fs::lchown(dir.as_ref(), uid.unwrap_or(u32::MAX), gid.unwrap_or(u32::MAX))
10451046
}

library/std/src/sys/pal/unix/fs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,6 +1962,7 @@ pub fn fchown(fd: c_int, uid: u32, gid: u32) -> io::Result<()> {
19621962
Ok(())
19631963
}
19641964

1965+
#[cfg(not(any(target_os = "vxworks")))]
19651966
pub fn lchown(path: &Path, uid: u32, gid: u32) -> io::Result<()> {
19661967
run_path_with_cstr(path, &|path| {
19671968
cvt(unsafe { libc::lchown(path.as_ptr(), uid as libc::uid_t, gid as libc::gid_t) })

0 commit comments

Comments
 (0)