Not implement os::unix::fs::chroot for vxworks

This commit is contained in:
Christiaan Dirkx 2021-05-20 01:37:57 +02:00
parent 63791233ff
commit 03e90b7f7e
2 changed files with 2 additions and 2 deletions

View File

@ -906,7 +906,7 @@ impl DirBuilderExt for fs::DirBuilder {
/// }
/// ```
#[unstable(feature = "unix_chroot", issue = "84715")]
#[cfg(not(target_os = "fuchsia"))]
#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
pub fn chroot<P: AsRef<Path>>(dir: P) -> io::Result<()> {
sys::fs::chroot(dir.as_ref())
}

View File

@ -1329,7 +1329,7 @@ pub fn copy(from: &Path, to: &Path) -> io::Result<u64> {
Ok(bytes_copied as u64)
}
#[cfg(not(target_os = "fuchsia"))]
#[cfg(not(any(target_os = "fuchsia", target_os = "vxworks")))]
pub fn chroot(dir: &Path) -> io::Result<()> {
let dir = cstr(dir)?;
cvt(unsafe { libc::chroot(dir.as_ptr()) })?;