Rollup merge of #148126 - hax0kartik:vx-fix-148125, r=Mark-Simulacrum
Fix rust stdlib build failing for VxWorks
Fixes rust-lang/rust#148125.
O_NOFOLLOW is not supported on VxWorks. All the other defines/functions have been added to libc(0cd5032671)
This commit is contained in:
commit
5226e15770
1 changed files with 2 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ pub fn set_permissions(path: &Path, perm: FilePermissions) -> io::Result<()> {
|
|||
with_native_path(path, &|path| imp::set_perm(path, perm.clone()))
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "vxworks")))]
|
||||
pub fn set_permissions_nofollow(path: &Path, perm: crate::fs::Permissions) -> io::Result<()> {
|
||||
use crate::fs::OpenOptions;
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ pub fn set_permissions_nofollow(path: &Path, perm: crate::fs::Permissions) -> io
|
|||
options.open(path)?.set_permissions(perm)
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
#[cfg(any(not(unix), target_os = "vxworks"))]
|
||||
pub fn set_permissions_nofollow(_path: &Path, _perm: crate::fs::Permissions) -> io::Result<()> {
|
||||
crate::unimplemented!(
|
||||
"`set_permissions_nofollow` is currently only implemented on Unix platforms"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue