diff options
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/net.rs | 3 | ||||
| -rw-r--r-- | src/libstd/sys/common/stack.rs | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index e2ac5ac24f8..b5cd42219e1 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -694,7 +694,8 @@ impl TcpStream { setsockopt(self.fd(), libc::IPPROTO_TCP, libc::TCP_KEEPALIVE, seconds as libc::c_int) } - #[cfg(any(target_os = "freebsd", 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) diff --git a/src/libstd/sys/common/stack.rs b/src/libstd/sys/common/stack.rs index 8dd2f154fa8..5ebc851e194 100644 --- a/src/libstd/sys/common/stack.rs +++ b/src/libstd/sys/common/stack.rs @@ -189,7 +189,8 @@ pub unsafe fn record_sp_limit(limit: uint) { unsafe fn target_record_sp_limit(limit: uint) { asm!("movq $0, %fs:24" :: "r"(limit) :: "volatile") } - #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] #[inline(always)] + #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] + #[inline(always)] unsafe fn target_record_sp_limit(limit: uint) { asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile") } @@ -233,6 +234,7 @@ pub unsafe fn record_sp_limit(limit: uint) { #[cfg(any(target_arch = "aarch64", target_arch = "powerpc", all(target_arch = "arm", target_os = "ios"), + target_os = "bitrig", target_os = "openbsd"))] unsafe fn target_record_sp_limit(_: uint) { } @@ -276,14 +278,14 @@ pub unsafe fn get_sp_limit() -> uint { asm!("movq %fs:24, $0" : "=r"(limit) ::: "volatile"); return limit; } - #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] #[inline(always)] + #[cfg(all(target_arch = "x86_64", target_os = "dragonfly"))] + #[inline(always)] unsafe fn target_get_sp_limit() -> uint { let limit; asm!("movq %fs:32, $0" : "=r"(limit) ::: "volatile"); return limit; } - // x86 #[cfg(all(target_arch = "x86", any(target_os = "macos", target_os = "ios")))] @@ -331,6 +333,7 @@ pub unsafe fn get_sp_limit() -> uint { #[cfg(any(target_arch = "aarch64", target_arch = "powerpc", all(target_arch = "arm", target_os = "ios"), + target_os = "bitrig", target_os = "openbsd"))] #[inline(always)] unsafe fn target_get_sp_limit() -> uint { |
