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