summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-18 21:10:08 +0000
committerGitHub <noreply@github.com>2020-10-18 21:10:08 +0000
commit5d2a8c221af121abe73e313bdfce8ae2f4372a83 (patch)
tree74ea75808737e0fa41869a9da786ee6c1c5f168a /src/sys
parentc51f63a5f83a742b7b19870ccaa5a508dfe3367b (diff)
parentb0d19969112e2c5954fdc3ad644ce97a78f4c133 (diff)
downloadnix-5d2a8c221af121abe73e313bdfce8ae2f4372a83.zip
Merge #1318
1318: KEEPCNT/KEEPINTVL aren't available on OpenBSD. r=asomers a=ltratt Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive settings can be set globally, but not per-socket (see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this). Since it seems that NetBSD and DragonflyBSD have these settings, it makes more sense to only exclude them on OpenBSD rather than include them on (pretty much every) other operating systems. Co-authored-by: Laurence Tratt <laurie@tratt.net>
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/socket/sockopt.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs
index e41a472a..5b7b4fea 100644
--- a/src/sys/socket/sockopt.rs
+++ b/src/sys/socket/sockopt.rs
@@ -252,7 +252,9 @@ sockopt_impl!(Both, TcpKeepAlive, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, u32);
target_os = "linux",
target_os = "nacl"))]
sockopt_impl!(Both, TcpKeepIdle, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, u32);
+#[cfg(not(target_os = "openbsd"))]
sockopt_impl!(Both, TcpKeepCount, libc::IPPROTO_TCP, libc::TCP_KEEPCNT, u32);
+#[cfg(not(target_os = "openbsd"))]
sockopt_impl!(Both, TcpKeepInterval, libc::IPPROTO_TCP, libc::TCP_KEEPINTVL, u32);
sockopt_impl!(Both, RcvBuf, libc::SOL_SOCKET, libc::SO_RCVBUF, usize);
sockopt_impl!(Both, SndBuf, libc::SOL_SOCKET, libc::SO_SNDBUF, usize);