From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/fs/abs.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vendor/rustix/src/fs/abs.rs') diff --git a/vendor/rustix/src/fs/abs.rs b/vendor/rustix/src/fs/abs.rs index f57bd00fe..8953f351e 100644 --- a/vendor/rustix/src/fs/abs.rs +++ b/vendor/rustix/src/fs/abs.rs @@ -1,7 +1,7 @@ //! POSIX-style filesystem functions which operate on bare paths. use crate::fd::OwnedFd; -#[cfg(not(target_os = "espidf"))] +#[cfg(not(any(target_os = "espidf", target_os = "vita")))] use crate::fs::Access; #[cfg(not(any( solarish, @@ -10,6 +10,7 @@ use crate::fs::Access; target_os = "netbsd", target_os = "nto", target_os = "redox", + target_os = "vita", target_os = "wasi", )))] use crate::fs::StatFs; @@ -129,7 +130,8 @@ fn _readlink(path: &CStr, mut buffer: Vec) -> io::Result { buffer.resize(nread, 0_u8); return Ok(CString::new(buffer).unwrap()); } - buffer.reserve(1); // use `Vec` reallocation strategy to grow capacity exponentially + // Use `Vec` reallocation strategy to grow capacity exponentially. + buffer.reserve(1); buffer.resize(buffer.capacity(), 0_u8); } } @@ -235,7 +237,7 @@ pub fn mkdir(path: P, mode: Mode) -> io::Result<()> { /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html /// [Linux]: https://man7.org/linux/man-pages/man2/access.2.html -#[cfg(not(target_os = "espidf"))] +#[cfg(not(any(target_os = "espidf", target_os = "vita")))] #[inline] pub fn access(path: P, access: Access) -> io::Result<()> { path.into_with_c_str(|path| backend::fs::syscalls::access(path, access)) @@ -257,6 +259,7 @@ pub fn access(path: P, access: Access) -> io::Result<()> { target_os = "netbsd", target_os = "nto", target_os = "redox", + target_os = "vita", target_os = "wasi", )))] #[inline] -- cgit v1.2.3