diff options
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/mod.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/common/util.rs | 6 | 
2 files changed, 12 insertions, 1 deletions
| diff --git a/src/libstd/sys/common/mod.rs b/src/libstd/sys/common/mod.rs index 2845f895f18..274f3c10d9c 100644 --- a/src/libstd/sys/common/mod.rs +++ b/src/libstd/sys/common/mod.rs @@ -32,7 +32,6 @@ pub mod condvar; pub mod io; pub mod memchr; pub mod mutex; -pub mod net; pub mod poison; pub mod remutex; pub mod rwlock; @@ -42,6 +41,12 @@ pub mod thread_local; pub mod util; pub mod wtf8; +#[cfg(redox)] +pub use sys::net; + +#[cfg(not(redox))] +pub mod net; + #[cfg(any(not(cargobuild), feature = "backtrace"))] #[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))), all(windows, target_env = "gnu")))] diff --git a/src/libstd/sys/common/util.rs b/src/libstd/sys/common/util.rs index b5d03576338..dda0abb4c0c 100644 --- a/src/libstd/sys/common/util.rs +++ b/src/libstd/sys/common/util.rs @@ -33,6 +33,12 @@ pub fn dumb_print(args: fmt::Arguments) { let _ = Stderr::new().map(|mut stderr| stderr.write_fmt(args)); } +// On Redox, use an illegal instruction +#[cfg(redox)] +unsafe fn abort_internal() -> ! { + ::intrinsics::abort() +} + // On Unix-like platforms, libc::abort will unregister signal handlers // including the SIGABRT handler, preventing the abort from being blocked, and // fclose streams, with the side effect of flushing them so libc bufferred | 
