@@ -77,6 +77,7 @@ impl Socket {
77
77
}
78
78
}
79
79
80
+ #[ cfg( not( target_os = "vxworks" ) ) ]
80
81
pub fn new_pair ( fam : c_int , ty : c_int ) -> io:: Result < ( Socket , Socket ) > {
81
82
unsafe {
82
83
let mut fds = [ 0 , 0 ] ;
@@ -98,6 +99,11 @@ impl Socket {
98
99
}
99
100
}
100
101
102
+ #[ cfg( target_os = "vxworks" ) ]
103
+ pub fn new_pair ( _fam : c_int , _ty : c_int ) -> io:: Result < ( Socket , Socket ) > {
104
+ unimplemented ! ( )
105
+ }
106
+
101
107
pub fn connect_timeout ( & self , addr : & SocketAddr , timeout : Duration ) -> io:: Result < ( ) > {
102
108
self . set_nonblocking ( true ) ?;
103
109
let r = unsafe {
@@ -366,7 +372,7 @@ impl IntoInner<c_int> for Socket {
366
372
// res_init unconditionally, we call it only when we detect we're linking
367
373
// against glibc version < 2.26. (That is, when we both know its needed and
368
374
// believe it's thread-safe).
369
- #[ cfg( target_env = "gnu" ) ]
375
+ #[ cfg( all ( target_env = "gnu" , not ( target_os = "vxworks" ) ) ) ]
370
376
fn on_resolver_failure ( ) {
371
377
use crate :: sys;
372
378
@@ -378,5 +384,5 @@ fn on_resolver_failure() {
378
384
}
379
385
}
380
386
381
- #[ cfg( not( target_env = "gnu" ) ) ]
387
+ #[ cfg( any ( not( target_env = "gnu" ) , target_os = "vxworks ") ) ]
382
388
fn on_resolver_failure ( ) { }
0 commit comments