diff options
| author | bors <bors@rust-lang.org> | 2015-02-21 09:20:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-21 09:20:48 +0000 |
| commit | 2b01a37ec38db9301239f0c0abcf3c695055b0ff (patch) | |
| tree | a8fbf2329325d51716f163780d5e932989d04e06 /src/libstd/sys/common | |
| parent | 522d09dfecbeca1595f25ac58c6d0178bbd21d7d (diff) | |
| parent | 551304015bac6f8424fcc6827855d3c61fe167c9 (diff) | |
| download | rust-2b01a37ec38db9301239f0c0abcf3c695055b0ff.tar.gz rust-2b01a37ec38db9301239f0c0abcf3c695055b0ff.zip | |
Auto merge of #21959 - dhuseby:bitrig-support, r=brson
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
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 { |
