From 2923771cc1599b5ce3b1a795119bcb4e4e06856d Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Fri, 3 Sep 2021 15:33:27 +0300 Subject: [PATCH] Add KEEPALIVE_TIME for haiku and openbsd --- src/sys/unix.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 413632e7..efc62d72 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -135,6 +135,8 @@ pub(crate) use libc::{TCP_KEEPCNT, TCP_KEEPINTVL}; // See this type in the Windows file. pub(crate) type Bool = c_int; +#[cfg(any(target_os = "haiku", target_os = "openbsd"))] +use libc::SO_KEEPALIVE as KEEPALIVE_TIME; #[cfg(target_vendor = "apple")] use libc::TCP_KEEPALIVE as KEEPALIVE_TIME; #[cfg(not(any(target_vendor = "apple", target_os = "haiku", target_os = "openbsd")))]