File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::fmt;
88use crate :: fs;
99use crate :: marker:: PhantomData ;
1010use crate :: mem:: forget;
11- #[ cfg( not( any( target_os = "wasi " , target_env = "sgx" ) ) ) ]
11+ #[ cfg( not( any( target_arch = "wasm32 " , target_env = "sgx" ) ) ) ]
1212use crate :: sys:: cvt;
1313use crate :: sys_common:: { AsInner , FromInner , IntoInner } ;
1414
@@ -76,7 +76,7 @@ impl BorrowedFd<'_> {
7676impl OwnedFd {
7777 /// Creates a new `OwnedFd` instance that shares the same underlying file handle
7878 /// as the existing `OwnedFd` instance.
79- #[ cfg( not( target_os = "wasi " ) ) ]
79+ #[ cfg( not( target_arch = "wasm32 " ) ) ]
8080 pub fn try_clone ( & self ) -> crate :: io:: Result < Self > {
8181 // We want to atomically duplicate this file descriptor and set the
8282 // CLOEXEC flag, and currently that's done via F_DUPFD_CLOEXEC. This
@@ -95,7 +95,7 @@ impl OwnedFd {
9595 Ok ( unsafe { Self :: from_raw_fd ( fd) } )
9696 }
9797
98- #[ cfg( target_os = "wasi " ) ]
98+ #[ cfg( target_arch = "wasm32 " ) ]
9999 pub fn try_clone ( & self ) -> crate :: io:: Result < Self > {
100100 Err ( crate :: io:: const_io_error!(
101101 crate :: io:: ErrorKind :: Unsupported ,
Original file line number Diff line number Diff line change 55use crate :: fs;
66use crate :: io;
77use crate :: os:: raw;
8- #[ cfg( doc) ]
8+ #[ cfg( all ( doc, not ( target_arch = "wasm32" ) ) ) ]
99use crate :: os:: unix:: io:: AsFd ;
1010#[ cfg( unix) ]
1111use crate :: os:: unix:: io:: OwnedFd ;
You can’t perform that action at this time.
0 commit comments