From d3444779e6776025ee19202c5e69964abde90374 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 29 Sep 2014 00:28:50 -0700 Subject: Fix libnative --- src/libnative/io/net.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libnative/io/net.rs') 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(()) } -- cgit 1.4.1-3-g733a5