diff --git a/src/backend/libc/fs/dir.rs b/src/backend/libc/fs/dir.rs index cd7f232d3..790f22a2b 100644 --- a/src/backend/libc/fs/dir.rs +++ b/src/backend/libc/fs/dir.rs @@ -24,13 +24,7 @@ use crate::fs::{fstat, Stat}; target_os = "wasi", )))] use crate::fs::{fstatfs, StatFs}; -#[cfg(not(any( - solarish, - target_os = "haiku", - target_os = "redox", - target_os = "vita", - target_os = "wasi" -)))] +#[cfg(not(any(solarish, target_os = "redox", target_os = "vita", target_os = "wasi")))] use crate::fs::{fstatvfs, StatVfs}; use crate::io; #[cfg(not(any(target_os = "fuchsia", target_os = "vita", target_os = "wasi")))] @@ -243,7 +237,6 @@ impl Dir { /// `fstatvfs(self)` #[cfg(not(any( solarish, - target_os = "haiku", target_os = "horizon", target_os = "redox", target_os = "vita", diff --git a/src/backend/libc/fs/syscalls.rs b/src/backend/libc/fs/syscalls.rs index ef1033cc3..ab69d4aef 100644 --- a/src/backend/libc/fs/syscalls.rs +++ b/src/backend/libc/fs/syscalls.rs @@ -60,7 +60,7 @@ use crate::fs::Timestamps; )))] use crate::fs::{Dev, FileType}; use crate::fs::{Mode, OFlags, SeekFrom, Stat}; -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] use crate::fs::{StatVfs, StatVfsMountFlags}; use crate::io; #[cfg(all(target_env = "gnu", fix_y2038))] @@ -271,7 +271,7 @@ pub(crate) fn statfs(filename: &CStr) -> io::Result { } } -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] #[inline] pub(crate) fn statvfs(filename: &CStr) -> io::Result { unsafe { @@ -1591,7 +1591,7 @@ pub(crate) fn fstatfs(fd: BorrowedFd<'_>) -> io::Result { } } -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] pub(crate) fn fstatvfs(fd: BorrowedFd<'_>) -> io::Result { let mut statvfs = MaybeUninit::::uninit(); unsafe { @@ -1600,7 +1600,7 @@ pub(crate) fn fstatvfs(fd: BorrowedFd<'_>) -> io::Result { } } -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] fn libc_statvfs_to_statvfs(from: c::statvfs) -> StatVfs { StatVfs { f_bsize: from.f_bsize as u64, diff --git a/src/backend/libc/fs/types.rs b/src/backend/libc/fs/types.rs index 54415bb32..471219e5e 100644 --- a/src/backend/libc/fs/types.rs +++ b/src/backend/libc/fs/types.rs @@ -845,7 +845,7 @@ bitflags! { } } -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] bitflags! { /// `ST_*` constants for use with [`StatVfs`]. #[repr(transparent)] @@ -877,11 +877,11 @@ bitflags! { const NOEXEC = c::ST_NOEXEC as u64; /// `ST_NOSUID` - #[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] + #[cfg(not(any(target_os = "espidf", target_os = "haiku", target_os = "horizon", target_os = "vita")))] const NOSUID = c::ST_NOSUID as u64; /// `ST_RDONLY` - #[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] + #[cfg(not(any(target_os = "espidf", target_os = "haiku", target_os = "horizon", target_os = "vita")))] const RDONLY = c::ST_RDONLY as u64; /// `ST_RELATIME` @@ -1077,7 +1077,7 @@ pub type Fsid = c::fsid_t; /// /// [`statvfs`]: crate::fs::statvfs /// [`fstatvfs`]: crate::fs::fstatvfs -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] #[allow(missing_docs)] pub struct StatVfs { pub f_bsize: u64, diff --git a/src/fs/fd.rs b/src/fs/fd.rs index 7ce1b3a46..c440f69de 100644 --- a/src/fs/fd.rs +++ b/src/fs/fd.rs @@ -40,7 +40,7 @@ use backend::fs::types::Stat; target_os = "wasi", )))] use backend::fs::types::StatFs; -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] use backend::fs::types::StatVfs; /// Timestamps used by [`utimensat`] and [`futimens`]. @@ -196,7 +196,7 @@ pub fn fstatfs(fd: Fd) -> io::Result { /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/fstatvfs.html /// [Linux]: https://man7.org/linux/man-pages/man2/fstatvfs.2.html -#[cfg(not(any(target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] #[inline] pub fn fstatvfs(fd: Fd) -> io::Result { backend::fs::syscalls::fstatvfs(fd.as_fd()) diff --git a/tests/io/ioctl.rs b/tests/io/ioctl.rs index 721d5e09b..77b0a76f0 100644 --- a/tests/io/ioctl.rs +++ b/tests/io/ioctl.rs @@ -1,5 +1,5 @@ // `ioctl_fionread` on Windows doesn't work on files. -#[cfg(not(any(windows, target_os = "cygwin")))] +#[cfg(not(any(windows, target_os = "cygwin", target_os = "haiku")))] #[test] fn test_ioctls() { let file = std::fs::File::open("Cargo.toml").unwrap();