Skip to content

Commit dce405a

Browse files
committed
Take sys/vxworks/net from sys/unix instead.
1 parent a489c33 commit dce405a

File tree

4 files changed

+9
-360
lines changed

4 files changed

+9
-360
lines changed

library/std/src/sys/unix/net.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl Socket {
7777
}
7878
}
7979

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

102+
#[cfg(target_os = "vxworks")]
103+
pub fn new_pair(_fam: c_int, _ty: c_int) -> io::Result<(Socket, Socket)> {
104+
unimplemented!()
105+
}
106+
101107
pub fn connect_timeout(&self, addr: &SocketAddr, timeout: Duration) -> io::Result<()> {
102108
self.set_nonblocking(true)?;
103109
let r = unsafe {
@@ -366,7 +372,7 @@ impl IntoInner<c_int> for Socket {
366372
// res_init unconditionally, we call it only when we detect we're linking
367373
// against glibc version < 2.26. (That is, when we both know its needed and
368374
// believe it's thread-safe).
369-
#[cfg(target_env = "gnu")]
375+
#[cfg(all(target_env = "gnu", not(target_os = "vxworks")))]
370376
fn on_resolver_failure() {
371377
use crate::sys;
372378

@@ -378,5 +384,5 @@ fn on_resolver_failure() {
378384
}
379385
}
380386

381-
#[cfg(not(target_env = "gnu"))]
387+
#[cfg(any(not(target_env = "gnu"), target_os = "vxworks"))]
382388
fn on_resolver_failure() {}

library/std/src/sys/vxworks/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub mod io;
2626
pub mod memchr;
2727
#[path = "../unix/mutex.rs"]
2828
pub mod mutex;
29+
#[path = "../unix/net.rs"]
2930
pub mod net;
3031
pub mod os;
3132
pub mod path;

library/std/src/sys/vxworks/net.rs

Lines changed: 0 additions & 335 deletions
This file was deleted.

0 commit comments

Comments
 (0)