]> git.lizzy.rs Git - rust.git/commitdiff
Not implement `os::unix::fs::chroot` for `vxworks`
authorChristiaan Dirkx <christiaan@dirkx.email>
Wed, 19 May 2021 23:37:57 +0000 (01:37 +0200)
committerChristiaan Dirkx <christiaan@dirkx.email>
Wed, 19 May 2021 23:37:57 +0000 (01:37 +0200)
library/std/src/os/unix/fs.rs
library/std/src/sys/unix/fs.rs

index 9cf51be2836fb5c8276f6ee976fc50e4d4eedb73..913c71d41087951b5d2ef41079fec089a6ebe821 100644 (file)
@@ -906,7 +906,7 @@ fn mode(&mut self, mode: u32) -> &mut 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())
 }
index 79617aa77b7b211d91b1a91f4e55af42bbc746a1..94ca3a6d71382898d4720847f5450dadba4f2dd4 100644 (file)
@@ -1329,7 +1329,7 @@ fn fclonefileat(
     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()) })?;