File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::fmt;
8
8
use crate :: fs;
9
9
use crate :: marker:: PhantomData ;
10
10
use crate :: mem:: forget;
11
- #[ cfg( not( any( target_os = "wasi " , target_env = "sgx" ) ) ) ]
11
+ #[ cfg( not( any( target_arch = "wasm32 " , target_env = "sgx" ) ) ) ]
12
12
use crate :: sys:: cvt;
13
13
use crate :: sys_common:: { AsInner , FromInner , IntoInner } ;
14
14
@@ -76,7 +76,7 @@ impl BorrowedFd<'_> {
76
76
impl OwnedFd {
77
77
/// Creates a new `OwnedFd` instance that shares the same underlying file handle
78
78
/// as the existing `OwnedFd` instance.
79
- #[ cfg( not( target_os = "wasi " ) ) ]
79
+ #[ cfg( not( target_arch = "wasm32 " ) ) ]
80
80
pub fn try_clone ( & self ) -> crate :: io:: Result < Self > {
81
81
// We want to atomically duplicate this file descriptor and set the
82
82
// CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This
@@ -95,7 +95,7 @@ impl OwnedFd {
95
95
Ok ( unsafe { Self :: from_raw_fd ( fd) } )
96
96
}
97
97
98
- #[ cfg( target_os = "wasi " ) ]
98
+ #[ cfg( target_arch = "wasm32 " ) ]
99
99
pub fn try_clone ( & self ) -> crate :: io:: Result < Self > {
100
100
Err ( crate :: io:: const_io_error!(
101
101
crate :: io:: ErrorKind :: Unsupported ,
Original file line number Diff line number Diff line change 5
5
use crate :: fs;
6
6
use crate :: io;
7
7
use crate :: os:: raw;
8
- #[ cfg( doc) ]
8
+ #[ cfg( all ( doc, not ( target_arch = "wasm32" ) ) ) ]
9
9
use crate :: os:: unix:: io:: AsFd ;
10
10
#[ cfg( unix) ]
11
11
use crate :: os:: unix:: io:: OwnedFd ;
You can’t perform that action at this time.
0 commit comments