@@ -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" ) ) ) ]
370376fn 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 ") ) ]
382388fn on_resolver_failure ( ) { }
0 commit comments