diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-09-29 00:28:50 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@palantir.com> | 2014-09-30 12:52:47 -0700 |
| commit | d3444779e6776025ee19202c5e69964abde90374 (patch) | |
| tree | ff2c8c27ce14ac9a02fcc76c30bf20e728409a95 /src/libnative/io/net.rs | |
| parent | efbb15d59ceb3dfbf4d7e4e778c815dd8d8f52cf (diff) | |
| download | rust-d3444779e6776025ee19202c5e69964abde90374.tar.gz rust-d3444779e6776025ee19202c5e69964abde90374.zip | |
Fix libnative
Diffstat (limited to 'src/libnative/io/net.rs')
| -rw-r--r-- | src/libnative/io/net.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs index 335a52b0bbe..419748b75c3 100644 --- a/src/libnative/io/net.rs +++ b/src/libnative/io/net.rs @@ -282,20 +282,20 @@ impl TcpStream { } } - #[cfg(target_os = "macos")] - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "macos", target_os = "ios"))] fn set_tcp_keepalive(&mut self, seconds: uint) -> IoResult<()> { setsockopt(self.fd(), libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, seconds as libc::c_int) } - #[cfg(target_os = "freebsd")] - #[cfg(target_os = "dragonfly")] + #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] fn set_tcp_keepalive(&mut self, seconds: uint) -> IoResult<()> { setsockopt(self.fd(), libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, seconds as libc::c_int) } - #[cfg(not(target_os = "macos"), not(target_os = "ios"), not(target_os = "freebsd"), - not(target_os = "dragonfly"))] + #[cfg(not(any(target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "dragonfly")))] fn set_tcp_keepalive(&mut self, _seconds: uint) -> IoResult<()> { Ok(()) } |
