diff options
| author | Michael Macias <zaeleus@gmail.com> | 2015-08-11 14:52:22 -0500 |
|---|---|---|
| committer | Michael Macias <zaeleus@gmail.com> | 2015-08-11 14:57:14 -0500 |
| commit | 8f4aee8e7f4e29293e985806d3876c030c0eb04b (patch) | |
| tree | ab01b98535a9f60fc18bfd21415c6d7a0a3846ff /src/libstd | |
| parent | 91c618f133a35ffccc7e03e06f9318c59d091ae3 (diff) | |
| download | rust-8f4aee8e7f4e29293e985806d3876c030c0eb04b.tar.gz rust-8f4aee8e7f4e29293e985806d3876c030c0eb04b.zip | |
std: Fix imports for ios target
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rand/os.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/backtrace.rs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index bd31fe08421..51c7606c802 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -182,12 +182,12 @@ mod imp { #[cfg(target_os = "ios")] mod imp { - use prelude::v1::*; + #[cfg(stage0)] use prelude::v1::*; use io; use mem; use rand::Rng; - use libc::{c_int, c_void, size_t}; + use libc::{c_int, size_t}; /// A random number generator that retrieves randomness straight from /// the operating system. Platform sources: diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs index 4128431ee64..bca4aa56d0a 100644 --- a/src/libstd/sys/unix/backtrace.rs +++ b/src/libstd/sys/unix/backtrace.rs @@ -107,6 +107,8 @@ use sys_common::backtrace::*; #[cfg(all(target_os = "ios", target_arch = "arm"))] #[inline(never)] pub fn write(w: &mut Write) -> io::Result<()> { + use mem; + extern { fn backtrace(buf: *mut *mut libc::c_void, sz: libc::c_int) -> libc::c_int; @@ -121,7 +123,7 @@ pub fn write(w: &mut Write) -> io::Result<()> { try!(writeln!(w, "stack backtrace:")); // 100 lines should be enough const SIZE: usize = 100; - let mut buf: [*mut libc::c_void; SIZE] = unsafe {mem::zeroed()}; + let mut buf: [*mut libc::c_void; SIZE] = unsafe { mem::zeroed() }; let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize}; // skipping the first one as it is write itself |
