Skip to content

Commit

Permalink
Take sys/vxworks/net from sys/unix instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Oct 16, 2020
1 parent a489c33 commit dce405a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 360 deletions.
10 changes: 8 additions & 2 deletions library/std/src/sys/unix/net.rs
Expand Up @@ -77,6 +77,7 @@ impl Socket {
}
}

#[cfg(not(target_os = "vxworks"))]
pub fn new_pair(fam: c_int, ty: c_int) -> io::Result<(Socket, Socket)> {
unsafe {
let mut fds = [0, 0];
Expand All @@ -98,6 +99,11 @@ impl Socket {
}
}

#[cfg(target_os = "vxworks")]
pub fn new_pair(_fam: c_int, _ty: c_int) -> io::Result<(Socket, Socket)> {
unimplemented!()
}

pub fn connect_timeout(&self, addr: &SocketAddr, timeout: Duration) -> io::Result<()> {
self.set_nonblocking(true)?;
let r = unsafe {
Expand Down Expand Up @@ -366,7 +372,7 @@ impl IntoInner<c_int> for Socket {
// res_init unconditionally, we call it only when we detect we're linking
// against glibc version < 2.26. (That is, when we both know its needed and
// believe it's thread-safe).
#[cfg(target_env = "gnu")]
#[cfg(all(target_env = "gnu", not(target_os = "vxworks")))]
fn on_resolver_failure() {
use crate::sys;

Expand All @@ -378,5 +384,5 @@ fn on_resolver_failure() {
}
}

#[cfg(not(target_env = "gnu"))]
#[cfg(any(not(target_env = "gnu"), target_os = "vxworks"))]
fn on_resolver_failure() {}
1 change: 1 addition & 0 deletions library/std/src/sys/vxworks/mod.rs
Expand Up @@ -26,6 +26,7 @@ pub mod io;
pub mod memchr;
#[path = "../unix/mutex.rs"]
pub mod mutex;
#[path = "../unix/net.rs"]
pub mod net;
pub mod os;
pub mod path;
Expand Down
335 changes: 0 additions & 335 deletions library/std/src/sys/vxworks/net.rs

This file was deleted.

0 comments on commit dce405a

Please sign in to comment.