diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3718cfa1c55..407df8a4a54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -467,6 +467,7 @@ jobs: strategy: matrix: target: + - name: x86_64-unknown-haiku - name: armv7-sony-vita-newlibeabihf exclude_features: "process,signal,rt-process-signal,full" steps: diff --git a/tokio/src/net/tcp/socket.rs b/tokio/src/net/tcp/socket.rs index 33b71485473..762546ee309 100644 --- a/tokio/src/net/tcp/socket.rs +++ b/tokio/src/net/tcp/socket.rs @@ -469,6 +469,7 @@ impl TcpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))] #[cfg_attr( docsrs, @@ -477,6 +478,7 @@ impl TcpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))) )] pub fn tos(&self) -> io::Result { @@ -496,6 +498,7 @@ impl TcpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))] #[cfg_attr( docsrs, @@ -504,6 +507,7 @@ impl TcpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))) )] pub fn set_tos(&self, tos: u32) -> io::Result<()> { diff --git a/tokio/src/net/udp.rs b/tokio/src/net/udp.rs index a34f7b9225b..58bf566a728 100644 --- a/tokio/src/net/udp.rs +++ b/tokio/src/net/udp.rs @@ -1864,6 +1864,7 @@ impl UdpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))] #[cfg_attr( docsrs, @@ -1872,6 +1873,7 @@ impl UdpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))) )] pub fn tos(&self) -> io::Result { @@ -1891,6 +1893,7 @@ impl UdpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))] #[cfg_attr( docsrs, @@ -1899,6 +1902,7 @@ impl UdpSocket { target_os = "redox", target_os = "solaris", target_os = "illumos", + target_os = "haiku" )))) )] pub fn set_tos(&self, tos: u32) -> io::Result<()> { diff --git a/tokio/src/net/unix/ucred.rs b/tokio/src/net/unix/ucred.rs index bcd1c755f6a..74e596bc9b6 100644 --- a/tokio/src/net/unix/ucred.rs +++ b/tokio/src/net/unix/ucred.rs @@ -35,7 +35,8 @@ impl UCred { target_os = "linux", target_os = "redox", target_os = "android", - target_os = "openbsd" + target_os = "openbsd", + target_os = "haiku" ))] pub(crate) use self::impl_linux::get_peer_cred; @@ -67,7 +68,8 @@ pub(crate) use self::impl_noproc::get_peer_cred; target_os = "linux", target_os = "redox", target_os = "android", - target_os = "openbsd" + target_os = "openbsd", + target_os = "haiku" ))] pub(crate) mod impl_linux { use crate::net::unix::{self, UnixStream}; @@ -77,7 +79,12 @@ pub(crate) mod impl_linux { #[cfg(target_os = "openbsd")] use libc::sockpeercred as ucred; - #[cfg(any(target_os = "linux", target_os = "redox", target_os = "android"))] + #[cfg(any( + target_os = "linux", + target_os = "redox", + target_os = "android", + target_os = "haiku" + ))] use libc::ucred; pub(crate) fn get_peer_cred(sock: &UnixStream) -> io::Result { diff --git a/tokio/src/signal/unix.rs b/tokio/src/signal/unix.rs index 31e2905c02d..e70863b54b7 100644 --- a/tokio/src/signal/unix.rs +++ b/tokio/src/signal/unix.rs @@ -147,6 +147,15 @@ impl SignalKind { Self(libc::SIGINT) } + #[cfg(target_os = "haiku")] + /// Represents the `SIGPOLL` signal. + /// + /// On POSIX systems this signal is sent when I/O operations are possible + /// on some file descriptor. By default, this signal is ignored. + pub const fn io() -> Self { + Self(libc::SIGPOLL) + } + #[cfg(not(target_os = "haiku"))] /// Represents the `SIGIO` signal. /// /// On Unix systems this signal is sent when I/O operations are possible