File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ impl Socket {
67
67
// this option, however, was added in 2.6.27, and we still support
68
68
// 2.6.18 as a kernel, so if the returned error is EINVAL we
69
69
// fallthrough to the fallback.
70
- if cfg ! ( linux) {
70
+ if cfg ! ( target_os = " linux" ) {
71
71
match cvt ( libc:: socket ( fam, ty | SOCK_CLOEXEC , 0 ) ) {
72
72
Ok ( fd) => return Ok ( Socket ( FileDesc :: new ( fd) ) ) ,
73
73
Err ( ref e) if e. raw_os_error ( ) == Some ( libc:: EINVAL ) => { }
@@ -87,7 +87,7 @@ impl Socket {
87
87
let mut fds = [ 0 , 0 ] ;
88
88
89
89
// Like above, see if we can set cloexec atomically
90
- if cfg ! ( linux) {
90
+ if cfg ! ( target_os = " linux" ) {
91
91
match cvt ( libc:: socketpair ( fam, ty | SOCK_CLOEXEC , 0 , fds. as_mut_ptr ( ) ) ) {
92
92
Ok ( _) => {
93
93
return Ok ( ( Socket ( FileDesc :: new ( fds[ 0 ] ) ) , Socket ( FileDesc :: new ( fds[ 1 ] ) ) ) ) ;
You can’t perform that action at this time.
0 commit comments