From 8bd7f72ada913f86ac65f5d29adaf0f7f889f18a Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 29 Aug 2023 19:58:40 +0000 Subject: [PATCH] Add GNU/Hurd support --- src/backend/libc/fs/dir.rs | 4 +- src/backend/libc/fs/syscalls.rs | 4 +- src/backend/libc/fs/types.rs | 11 ++- src/backend/libc/io/errno.rs | 107 +++++++++++++++++++++++++++--- src/backend/libc/io/types.rs | 9 ++- src/backend/libc/offset.rs | 17 +++-- src/backend/libc/process/types.rs | 47 +++++++++++-- src/backend/libc/termios/types.rs | 14 +++- src/io/pipe.rs | 1 + 9 files changed, 183 insertions(+), 31 deletions(-) diff --git a/src/backend/libc/fs/dir.rs b/src/backend/libc/fs/dir.rs index 720f7d01e..2468297da 100644 --- a/src/backend/libc/fs/dir.rs +++ b/src/backend/libc/fs/dir.rs @@ -20,9 +20,9 @@ use crate::io; #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] use crate::process::fchdir; use alloc::borrow::ToOwned; -#[cfg(not(linux_like))] +#[cfg(not(any(linux_like, target_os = "hurd")))] use c::readdir as libc_readdir; -#[cfg(linux_like)] +#[cfg(any(linux_like, target_os = "hurd"))] use c::readdir64 as libc_readdir; use core::fmt; use core::ptr::NonNull; diff --git a/src/backend/libc/fs/syscalls.rs b/src/backend/libc/fs/syscalls.rs index 2b4e14ac6..4943b7ff2 100644 --- a/src/backend/libc/fs/syscalls.rs +++ b/src/backend/libc/fs/syscalls.rs @@ -122,7 +122,7 @@ weak!(fn __futimens64(c::c_int, *const LibcTimespec) -> c::c_int); /// Use a direct syscall (via libc) for `openat`. /// /// This is only currently necessary as a workaround for old glibc; see below. -#[cfg(all(unix, target_env = "gnu"))] +#[cfg(all(unix, target_env = "gnu", not(target_os = "hurd")))] fn openat_via_syscall( dirfd: BorrowedFd<'_>, path: &CStr, @@ -153,7 +153,7 @@ pub(crate) fn openat( ) -> io::Result { // Work around . // glibc versions before 2.25 don't handle `O_TMPFILE` correctly. - #[cfg(all(unix, target_env = "gnu"))] + #[cfg(all(unix, target_env = "gnu", not(target_os = "hurd")))] if oflags.contains(OFlags::TMPFILE) && crate::backend::if_glibc_is_less_than_2_25() { return openat_via_syscall(dirfd, path, oflags, mode); } diff --git a/src/backend/libc/fs/types.rs b/src/backend/libc/fs/types.rs index ffb67cf42..0feb9a853 100644 --- a/src/backend/libc/fs/types.rs +++ b/src/backend/libc/fs/types.rs @@ -274,6 +274,7 @@ bitflags! { target_os = "android", target_os = "emscripten", target_os = "fuchsia", + target_os = "hurd", target_os = "linux", ))] const TMPFILE = c::O_TMPFILE; @@ -717,6 +718,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] const KEEP_SIZE = c::FALLOC_FL_KEEP_SIZE; @@ -725,6 +727,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] const PUNCH_HOLE = c::FALLOC_FL_PUNCH_HOLE; @@ -733,6 +736,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "linux", target_os = "emscripten", target_os = "fuchsia", @@ -744,6 +748,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "emscripten", target_os = "wasi", )))] @@ -753,6 +758,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "emscripten", target_os = "wasi", )))] @@ -762,6 +768,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "emscripten", target_os = "wasi", )))] @@ -771,6 +778,7 @@ bitflags! { bsd, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "emscripten", target_os = "wasi", )))] @@ -844,7 +852,7 @@ pub enum FlockOperation { /// /// [`statat`]: crate::fs::statat /// [`fstat`]: crate::fs::fstat -#[cfg(not(linux_like))] +#[cfg(not(any(linux_like, target_os = "hurd")))] pub type Stat = c::stat; /// `struct stat` for use with [`statat`] and [`fstat`]. @@ -853,6 +861,7 @@ pub type Stat = c::stat; /// [`fstat`]: crate::fs::fstat #[cfg(any( all(linux_kernel, target_pointer_width = "64"), + target_os = "hurd", target_os = "emscripten", target_os = "l4re", ))] diff --git a/src/backend/libc/io/errno.rs b/src/backend/libc/io/errno.rs index 9e808c0b4..cd41085a9 100644 --- a/src/backend/libc/io/errno.rs +++ b/src/backend/libc/io/errno.rs @@ -29,6 +29,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const ADV: Self = Self(c::EADV); @@ -47,6 +48,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BADE: Self = Self(c::EBADE); @@ -58,6 +60,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BADFD: Self = Self(c::EBADFD); @@ -70,6 +73,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BADR: Self = Self(c::EBADR); @@ -82,6 +86,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BADRQC: Self = Self(c::EBADRQC); @@ -91,6 +96,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BADSLT: Self = Self(c::EBADSLT); @@ -100,6 +106,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const BFONT: Self = Self(c::EBFONT); @@ -115,7 +122,13 @@ impl Errno { #[cfg(not(windows))] pub const CHILD: Self = Self(c::ECHILD); /// `ECHRNG` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const CHRNG: Self = Self(c::ECHRNG); /// `ECOMM` #[cfg(not(any( @@ -123,6 +136,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const COMM: Self = Self(c::ECOMM); @@ -142,6 +156,7 @@ impl Errno { target_os = "aix", target_os = "android", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const DEADLOCK: Self = Self(c::EDEADLOCK); @@ -163,6 +178,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const DOTDOT: Self = Self(c::EDOTDOT); @@ -192,6 +208,7 @@ impl Errno { target_os = "aix", target_os = "android", target_os = "haiku", + target_os = "hurd", target_os = "redox", target_os = "wasi", )))] @@ -234,6 +251,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const ISNAM: Self = Self(c::EISNAM); @@ -244,6 +262,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const KEYEXPIRED: Self = Self(c::EKEYEXPIRED); @@ -254,6 +273,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const KEYREJECTED: Self = Self(c::EKEYREJECTED); @@ -264,20 +284,45 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const KEYREVOKED: Self = Self(c::EKEYREVOKED); /// `EL2HLT` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const L2HLT: Self = Self(c::EL2HLT); /// `EL2NSYNC` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const L2NSYNC: Self = Self(c::EL2NSYNC); /// `EL3HLT` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const L3HLT: Self = Self(c::EL3HLT); /// `EL3RST` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const L3RST: Self = Self(c::EL3RST); /// `ELIBACC` #[cfg(not(any( @@ -285,6 +330,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const LIBACC: Self = Self(c::ELIBACC); @@ -294,6 +340,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const LIBBAD: Self = Self(c::ELIBBAD); @@ -312,6 +359,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const LIBMAX: Self = Self(c::ELIBMAX); @@ -321,11 +369,18 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const LIBSCN: Self = Self(c::ELIBSCN); /// `ELNRNG` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const LNRNG: Self = Self(c::ELNRNG); /// `ELOOP` pub const LOOP: Self = Self(c::ELOOP); @@ -336,6 +391,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const MEDIUMTYPE: Self = Self(c::EMEDIUMTYPE); @@ -358,6 +414,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NAVAIL: Self = Self(c::ENAVAIL); @@ -379,6 +436,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOANO: Self = Self(c::ENOANO); @@ -388,7 +446,13 @@ impl Errno { /// `ENOBUFS` pub const NOBUFS: Self = Self(c::ENOBUFS); /// `ENOCSI` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const NOCSI: Self = Self(c::ENOCSI); /// `ENODATA` #[cfg(not(any( @@ -415,6 +479,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOKEY: Self = Self(c::ENOKEY); @@ -431,6 +496,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOMEDIUM: Self = Self(c::ENOMEDIUM); @@ -449,6 +515,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NONET: Self = Self(c::ENONET); @@ -458,6 +525,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOPKG: Self = Self(c::ENOPKG); @@ -507,6 +575,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOTNAM: Self = Self(c::ENOTNAM); @@ -527,6 +596,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const NOTUNIQ: Self = Self(c::ENOTUNIQ); @@ -584,6 +654,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const REMCHG: Self = Self(c::EREMCHG); @@ -597,11 +668,18 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const REMOTEIO: Self = Self(c::EREMOTEIO); /// `ERESTART` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const RESTART: Self = Self(c::ERESTART); /// `ERFKILL` #[cfg(not(any( @@ -611,6 +689,7 @@ impl Errno { target_os = "aix", target_os = "android", target_os = "haiku", + target_os = "hurd", target_os = "redox", target_os = "wasi", )))] @@ -639,6 +718,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const SRMNT: Self = Self(c::ESRMNT); @@ -650,6 +730,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const STRPIPE: Self = Self(c::ESTRPIPE); @@ -675,11 +756,18 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const UCLEAN: Self = Self(c::EUCLEAN); /// `EUNATCH` - #[cfg(not(any(bsd, windows, target_os = "haiku", target_os = "wasi")))] + #[cfg(not(any( + bsd, + windows, + target_os = "haiku", + target_os = "hurd", + target_os = "wasi", + )))] pub const UNATCH: Self = Self(c::EUNATCH); /// `EUSERS` #[cfg(not(any(target_os = "haiku", target_os = "wasi")))] @@ -695,6 +783,7 @@ impl Errno { windows, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "wasi", )))] pub const XFULL: Self = Self(c::EXFULL); diff --git a/src/backend/libc/io/types.rs b/src/backend/libc/io/types.rs index 711f0ba75..f679b00ca 100644 --- a/src/backend/libc/io/types.rs +++ b/src/backend/libc/io/types.rs @@ -78,6 +78,7 @@ bitflags! { #[cfg(not(any( solarish, target_os = "haiku", + target_os = "hurd", target_os = "openbsd", target_os = "redox", )))] @@ -103,7 +104,13 @@ bitflags! { } /// `PIPE_BUF`—The maximum size of a write to a pipe guaranteed to be atomic. -#[cfg(not(any(solarish, target_os = "haiku", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any( + solarish, + target_os = "haiku", + target_os = "hurd", + target_os = "redox", + target_os = "wasi", +)))] pub const PIPE_BUF: usize = c::PIPE_BUF; #[cfg(not(any(windows, target_os = "redox")))] diff --git a/src/backend/libc/offset.rs b/src/backend/libc/offset.rs index a046bcea9..6fdfa13b9 100644 --- a/src/backend/libc/offset.rs +++ b/src/backend/libc/offset.rs @@ -3,14 +3,14 @@ #[cfg(not(windows))] use super::c; -#[cfg(not(any(linux_like, windows)))] +#[cfg(not(any(linux_like, windows, target_os = "hurd")))] #[cfg(feature = "fs")] pub(super) use c::{ fstat as libc_fstat, fstatat as libc_fstatat, ftruncate as libc_ftruncate, ino_t as libc_ino_t, lseek as libc_lseek, off_t as libc_off_t, }; -#[cfg(linux_like)] +#[cfg(any(linux_like, target_os = "hurd"))] #[cfg(feature = "fs")] pub(super) use c::{ fstat64 as libc_fstat, fstatat64 as libc_fstatat, ftruncate64 as libc_ftruncate, @@ -123,17 +123,18 @@ pub(super) use c::fallocate64 as libc_fallocate; windows, target_os = "dragonfly", target_os = "haiku", + target_os = "hurd", target_os = "redox", )))] #[cfg(feature = "fs")] pub(super) use c::posix_fadvise as libc_posix_fadvise; -#[cfg(linux_like)] +#[cfg(any(linux_like, target_os = "hurd"))] #[cfg(feature = "fs")] pub(super) use c::posix_fadvise64 as libc_posix_fadvise; -#[cfg(not(any(linux_kernel, windows, target_os = "emscripten")))] +#[cfg(not(any(linux_kernel, windows, target_os = "emscripten", target_os = "hurd")))] pub(super) use c::{pread as libc_pread, pwrite as libc_pwrite}; -#[cfg(any(linux_kernel, target_os = "emscripten"))] +#[cfg(any(linux_kernel, target_os = "emscripten", target_os = "hurd"))] pub(super) use c::{pread64 as libc_pread, pwrite64 as libc_pwrite}; #[cfg(not(any( apple, @@ -141,11 +142,12 @@ pub(super) use c::{pread64 as libc_pread, pwrite64 as libc_pwrite}; windows, target_os = "emscripten", target_os = "haiku", + target_os = "hurd", target_os = "redox", target_os = "solaris", )))] pub(super) use c::{preadv as libc_preadv, pwritev as libc_pwritev}; -#[cfg(any(target_os = "linux", target_os = "emscripten"))] +#[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "hurd"))] pub(super) use c::{preadv64 as libc_preadv, pwritev64 as libc_pwritev}; #[cfg(target_os = "android")] @@ -366,12 +368,13 @@ pub(super) use readwrite_pv64v2::{preadv64v2 as libc_preadv2, pwritev64v2 as lib target_os = "aix", target_os = "dragonfly", target_os = "fuchsia", + target_os = "hurd", target_os = "l4re", target_os = "redox", )))] #[cfg(feature = "fs")] pub(super) use c::posix_fallocate as libc_posix_fallocate; -#[cfg(target_os = "l4re")] +#[cfg(any(target_os = "l4re", target_os = "hurd"))] #[cfg(feature = "fs")] pub(super) use c::posix_fallocate64 as libc_posix_fallocate; #[cfg(not(any( diff --git a/src/backend/libc/process/types.rs b/src/backend/libc/process/types.rs index 3eb300278..4559ec6aa 100644 --- a/src/backend/libc/process/types.rs +++ b/src/backend/libc/process/types.rs @@ -74,19 +74,49 @@ pub enum Resource { #[cfg(not(target_os = "openbsd"))] As = c::RLIMIT_AS as c::c_int, /// `RLIMIT_LOCKS` - #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + )))] Locks = c::RLIMIT_LOCKS as c::c_int, /// `RLIMIT_SIGPENDING` - #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + )))] Sigpending = c::RLIMIT_SIGPENDING as c::c_int, /// `RLIMIT_MSGQUEUE` - #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + )))] Msgqueue = c::RLIMIT_MSGQUEUE as c::c_int, /// `RLIMIT_NICE` - #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + )))] Nice = c::RLIMIT_NICE as c::c_int, /// `RLIMIT_RTPRIO` - #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + )))] Rtprio = c::RLIMIT_RTPRIO as c::c_int, /// `RLIMIT_RTTIME` #[cfg(not(any( @@ -96,6 +126,7 @@ pub enum Resource { target_os = "android", target_os = "emscripten", target_os = "haiku", + target_os = "hurd", )))] Rttime = c::RLIMIT_RTTIME as c::c_int, } @@ -156,6 +187,7 @@ pub enum Signal { solarish, target_os = "aix", target_os = "haiku", + target_os = "hurd", all( linux_kernel, any( @@ -198,7 +230,7 @@ pub enum Signal { #[cfg(not(target_os = "haiku"))] Io = c::SIGIO, /// `SIGPWR` - #[cfg(not(any(bsd, target_os = "haiku")))] + #[cfg(not(any(bsd, target_os = "haiku", target_os = "hurd")))] #[doc(alias = "Pwr")] Power = c::SIGPWR, /// `SIGSYS`, aka `SIGUNUSED` @@ -255,6 +287,7 @@ impl Signal { solarish, target_os = "aix", target_os = "haiku", + target_os = "hurd", all( linux_kernel, any( @@ -280,7 +313,7 @@ impl Signal { c::SIGWINCH => Some(Self::Winch), #[cfg(not(target_os = "haiku"))] c::SIGIO => Some(Self::Io), - #[cfg(not(any(bsd, target_os = "haiku")))] + #[cfg(not(any(bsd, target_os = "haiku", target_os = "hurd")))] c::SIGPWR => Some(Self::Power), c::SIGSYS => Some(Self::Sys), #[cfg(bsd)] diff --git a/src/backend/libc/termios/types.rs b/src/backend/libc/termios/types.rs index daaf54f4b..bc44738cc 100644 --- a/src/backend/libc/termios/types.rs +++ b/src/backend/libc/termios/types.rs @@ -127,7 +127,13 @@ pub const VTIME: usize = c::VTIME as usize; pub const VMIN: usize = c::VMIN as usize; /// `VSWTC` -#[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] +#[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", +)))] pub const VSWTC: usize = c::VSWTC as usize; /// `VSTART` @@ -214,6 +220,7 @@ pub const IMAXBEL: Tcflag = c::IMAXBEL; target_os = "aix", target_os = "emscripten", target_os = "haiku", + target_os = "hurd", target_os = "redox", )))] pub const IUTF8: Tcflag = c::IUTF8; @@ -640,7 +647,7 @@ pub const EXTA: Speed = c::EXTA; pub const EXTB: Speed = c::EXTB; /// `CBAUD` -#[cfg(not(any(bsd, target_os = "haiku", target_os = "redox")))] +#[cfg(not(any(bsd, target_os = "haiku", target_os = "hurd", target_os = "redox")))] pub const CBAUD: Tcflag = c::CBAUD; /// `CBAUDEX` @@ -649,6 +656,7 @@ pub const CBAUD: Tcflag = c::CBAUD; solarish, target_os = "aix", target_os = "haiku", + target_os = "hurd", target_os = "redox", )))] pub const CBAUDEX: Tcflag = c::CBAUDEX; @@ -660,6 +668,7 @@ pub const CBAUDEX: Tcflag = c::CBAUDEX; bsd, target_os = "emscripten", target_os = "haiku", + target_os = "hurd", target_os = "redox", )))] pub const CIBAUD: Tcflag = c::CIBAUD; @@ -677,6 +686,7 @@ pub const CIBAUD: Tcflag = 0o77600000; target_os = "aix", target_os = "emscripten", target_os = "haiku", + target_os = "hurd", target_os = "redox", )))] pub const CMSPAR: Tcflag = c::CMSPAR; diff --git a/src/io/pipe.rs b/src/io/pipe.rs index b54abe8e8..cc492872e 100644 --- a/src/io/pipe.rs +++ b/src/io/pipe.rs @@ -29,6 +29,7 @@ pub use backend::io::types::{IoSliceRaw, SpliceFlags}; solarish, windows, target_os = "haiku", + target_os = "hurd", target_os = "redox", target_os = "wasi", )))]