diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-07 20:38:25 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-10-16 06:19:00 +0200 |
| commit | dce405ae3dd5996a3f97f13f40f87f23261f8ccd (patch) | |
| tree | 9ab095d56e23550b881c8efec05b40dac136a98f /library/std/src/sys/unix/net.rs | |
| parent | a489c33bebaee645efa8be0c9455bed89ef6dd41 (diff) | |
| download | rust-dce405ae3dd5996a3f97f13f40f87f23261f8ccd.tar.gz rust-dce405ae3dd5996a3f97f13f40f87f23261f8ccd.zip | |
Take sys/vxworks/net from sys/unix instead.
Diffstat (limited to 'library/std/src/sys/unix/net.rs')
| -rw-r--r-- | library/std/src/sys/unix/net.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/unix/net.rs index 011325fddc5..74c7db27226 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/unix/net.rs @@ -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]; @@ -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 { @@ -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; @@ -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() {} |
