about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-15 13:32:21 +0000
committerbors <bors@rust-lang.org>2015-03-15 13:32:21 +0000
commit95018eec69679681acdfae8608779c1e2674322d (patch)
tree80425c27c8562e333e139ea4782feeed1397974d /src/libstd/sys
parent54660fc392343e4ddee8a0ea1ca196ffc533585b (diff)
parent04c947c13a180e00ce87970ac573862247c69cde (diff)
downloadrust-95018eec69679681acdfae8608779c1e2674322d.tar.gz
rust-95018eec69679681acdfae8608779c1e2674322d.zip
Auto merge of #23372 - tamird:fix-ios-compilation, r=alexcrichton
r? @alexcrichton cc @vhbit
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/backtrace.rs2
-rw-r--r--src/libstd/sys/unix/tty.rs14
2 files changed, 3 insertions, 13 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs
index 3fa9f5d07aa..74ab04978cb 100644
--- a/src/libstd/sys/unix/backtrace.rs
+++ b/src/libstd/sys/unix/backtrace.rs
@@ -118,7 +118,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
     // local, it still displays much nicer backtraces when a
     // couple of tasks panic simultaneously
     static LOCK: StaticMutex = MUTEX_INIT;
-    let _g = unsafe { LOCK.lock() };
+    let _g = LOCK.lock();
 
     try!(writeln!(w, "stack backtrace:"));
     // 100 lines should be enough
diff --git a/src/libstd/sys/unix/tty.rs b/src/libstd/sys/unix/tty.rs
index f607f7c6a2f..e4973a8f9f3 100644
--- a/src/libstd/sys/unix/tty.rs
+++ b/src/libstd/sys/unix/tty.rs
@@ -23,6 +23,8 @@ pub struct TTY {
 }
 
 #[cfg(any(target_os = "macos",
+          target_os = "ios",
+          target_os = "dragonfly",
           target_os = "freebsd",
           target_os = "bitrig",
           target_os = "openbsd"))]
@@ -54,12 +56,6 @@ impl TTY {
         Err(sys_common::unimpl())
     }
 
-    #[cfg(any(target_os = "linux",
-              target_os = "android",
-              target_os = "macos",
-              target_os = "freebsd",
-              target_os = "bitrig",
-              target_os = "openbsd"))]
     pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
         unsafe {
             #[repr(C)]
@@ -82,10 +78,4 @@ impl TTY {
             }
         }
     }
-
-    #[cfg(any(target_os = "ios",
-              target_os = "dragonfly"))]
-    pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
-        Err(sys_common::unimpl())
-    }
 }