From 0d617ce4c9a798697d32bf8272e9d2d04213457f Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 12 Jul 2017 20:37:18 -0600 Subject: Update tcp.rs --- src/libstd/sys/redox/net/tcp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/redox/net/tcp.rs b/src/libstd/sys/redox/net/tcp.rs index 5d1067e4039..98ec3aa3e29 100644 --- a/src/libstd/sys/redox/net/tcp.rs +++ b/src/libstd/sys/redox/net/tcp.rs @@ -32,7 +32,7 @@ impl TcpStream { Ok(TcpStream(File::open(&Path::new(path.as_str()), &options)?)) } - pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result<()> { + pub fn connect_timeout(_addr: &SocketAddr, _timeout: Duration) -> Result { Err(Error::new(ErrorKind::Other, "TcpStream::connect_timeout not implemented")) } -- cgit 1.4.1-3-g733a5 From 03f22fdf5e290618d2055d48881e31439a6b74ec Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 13 Jul 2017 11:14:35 -0700 Subject: windows::fs::symlink_dir: fix example to actually use symlink_dir --- src/libstd/sys/windows/ext/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs index 67348a00494..a1c63e33588 100644 --- a/src/libstd/sys/windows/ext/fs.rs +++ b/src/libstd/sys/windows/ext/fs.rs @@ -477,7 +477,7 @@ pub fn symlink_file, Q: AsRef>(src: P, dst: Q) /// use std::os::windows::fs; /// /// # fn foo() -> std::io::Result<()> { -/// fs::symlink_file("a", "b")?; +/// fs::symlink_dir("a", "b")?; /// # Ok(()) /// # } /// ``` -- cgit 1.4.1-3-g733a5 From 5757e0561975b40f81a739feb73abdc377eeda3a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 13 Jul 2017 20:07:37 -0600 Subject: Fix backtrace on Redox --- src/libstd/sys/redox/backtrace.rs | 15 ++++++++++++--- src/libstd/sys_common/mod.rs | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/redox/backtrace.rs b/src/libstd/sys/redox/backtrace.rs index 961148fb6b4..6cafe3e69ba 100644 --- a/src/libstd/sys/redox/backtrace.rs +++ b/src/libstd/sys/redox/backtrace.rs @@ -8,16 +8,25 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use libc; use io; use sys_common::backtrace::Frame; -pub use sys_common::gnu::libbacktrace::*; +pub use sys_common::gnu::libbacktrace::{foreach_symbol_fileline, resolve_symname}; pub struct BacktraceContext; #[inline(never)] -pub fn unwind_backtrace(frames: &mut [Frame]) +pub fn unwind_backtrace(_frames: &mut [Frame]) -> io::Result<(usize, BacktraceContext)> { Ok((0, BacktraceContext)) } + +pub mod gnu { + use io; + use fs; + use libc::c_char; + + pub fn get_executable_filename() -> io::Result<(Vec, fs::File)> { + Err(io::Error::new(io::ErrorKind::Other, "Not implemented")) + } +} diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs index d4d3365dc01..ccd4b91a7b7 100644 --- a/src/libstd/sys_common/mod.rs +++ b/src/libstd/sys_common/mod.rs @@ -52,7 +52,8 @@ pub mod net; #[cfg(feature = "backtrace")] #[cfg(any(all(unix, not(any(target_os = "macos", target_os = "ios", target_os = "emscripten"))), - all(windows, target_env = "gnu")))] + all(windows, target_env = "gnu"), + target_os = "redox"))] pub mod gnu; // common error constructors -- cgit 1.4.1-3-g733a5