Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cfg_if! {
if #[cfg(any(target_os = "dragonfly",
target_os = "freebsd",
target_os = "haiku",
target_os = "hurd",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand Down Expand Up @@ -663,7 +664,10 @@ impl<T: AsRawSocket> AsSock for T {
cfg_if! {
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "nto"))] {
use libc::TCP_KEEPALIVE as KEEPALIVE_OPTION;
} else if #[cfg(any(target_os = "haiku", target_os = "netbsd", target_os = "openbsd"))] {
} else if #[cfg(any(target_os = "haiku",
target_os = "hurd",
target_os = "netbsd",
target_os = "openbsd"))] {
use libc::SO_KEEPALIVE as KEEPALIVE_OPTION;
} else if #[cfg(unix)] {
use libc::TCP_KEEPIDLE as KEEPALIVE_OPTION;
Expand Down
2 changes: 2 additions & 0 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ fn addr2raw_v4(addr: &SocketAddrV4) -> (SocketAddrCRepr, c::socklen_t) {
#[cfg(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "hurd",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand Down Expand Up @@ -175,6 +176,7 @@ fn addr2raw_v6(addr: &SocketAddrV6) -> (SocketAddrCRepr, c::socklen_t) {
#[cfg(any(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "hurd",
target_os = "ios",
target_os = "macos",
target_os = "netbsd",
Expand Down