Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on Redox #39961

Merged
merged 1 commit into from
Feb 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libstd/sys/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use io::{self, ErrorKind};

pub mod args;
#[cfg(any(not(cargobuild), feature = "backtrace"))]
#[cfg(feature = "backtrace")]
pub mod backtrace;
pub mod condvar;
pub mod env;
Expand Down
4 changes: 4 additions & 0 deletions src/libstd/sys/redox/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ impl TcpStream {
Ok(path_to_local_addr(path.to_str().unwrap_or("")))
}

pub fn peek(&self, _buf: &mut [u8]) -> Result<usize> {
Err(Error::new(ErrorKind::Other, "TcpStream::peek not implemented"))
}

pub fn shutdown(&self, _how: Shutdown) -> Result<()> {
Err(Error::new(ErrorKind::Other, "TcpStream::shutdown not implemented"))
}
Expand Down
8 changes: 8 additions & 0 deletions src/libstd/sys/redox/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ impl UdpSocket {
Ok(path_to_local_addr(path.to_str().unwrap_or("")))
}

pub fn peek(&self, _buf: &mut [u8]) -> Result<usize> {
Err(Error::new(ErrorKind::Other, "UdpSocket::peek not implemented"))
}

pub fn peek_from(&self, _buf: &mut [u8]) -> Result<(usize, SocketAddr)> {
Err(Error::new(ErrorKind::Other, "UdpSocket::peek_from not implemented"))
}

pub fn broadcast(&self) -> Result<bool> {
Err(Error::new(ErrorKind::Other, "UdpSocket::broadcast not implemented"))
}
Expand Down