diff options
| author | bors <bors@rust-lang.org> | 2015-04-24 17:49:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-24 17:49:46 +0000 |
| commit | 2214860d4a979fe24d935277a74bd4d67e9bdb9f (patch) | |
| tree | 7d098be53532c229b5bc25bca8a4a88c8f10bd82 /src/libstd/sys | |
| parent | 714bd493c7aa374445853e761889cc9f9809fb2e (diff) | |
| parent | 4d6e2f5334ea1b2455357e279e8606b69dd9cf4c (diff) | |
| download | rust-2214860d4a979fe24d935277a74bd4d67e9bdb9f.tar.gz rust-2214860d4a979fe24d935277a74bd4d67e9bdb9f.zip | |
Auto merge of #24594 - doomsplayer:patch-2, r=alexcrichton
why use dummy implementation on linux?
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/net2.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/sys/common/net2.rs b/src/libstd/sys/common/net2.rs index 7d42d65d360..2b2c31d92ed 100644 --- a/src/libstd/sys/common/net2.rs +++ b/src/libstd/sys/common/net2.rs @@ -202,15 +202,19 @@ impl TcpStream { setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, seconds as c_int) } - #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] + #[cfg(any(target_os = "freebsd", + target_os = "dragonfly", + target_os = "linux"))] fn set_tcp_keepalive(&self, seconds: u32) -> io::Result<()> { setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, seconds as c_int) } + #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "freebsd", - target_os = "dragonfly")))] + target_os = "dragonfly", + target_os = "linux")))] fn set_tcp_keepalive(&self, _seconds: u32) -> io::Result<()> { Ok(()) } |
