File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,9 +57,10 @@ impl MultifileReader<'_> {
5757 // the buffering is done elsewhere and in a way that is aware of the `-N`
5858 // limit.
5959 let stdin = io:: stdin ( ) ;
60- #[ cfg( unix) ]
60+ #[ cfg( any ( unix, target_os = "wasi" ) ) ]
6161 {
6262 let stdin_raw_fd = stdin. as_raw_fd ( ) ;
63+ // FIXME: unexpected close with this unsafe fd
6364 let stdin_file = unsafe { File :: from_raw_fd ( stdin_raw_fd) } ;
6465 self . curr_file = Some ( Box :: new ( stdin_file) ) ;
6566 }
@@ -68,7 +69,7 @@ impl MultifileReader<'_> {
6869 // we don't need to prevent stdin buffering. This is sub-optimal (since
6970 // there will still be additional buffering further up the stack), but
7071 // doesn't seem worth worrying about at this time.
71- #[ cfg( not( unix) ) ]
72+ #[ cfg( not( any ( unix, target_os = "wasi" ) ) ) ]
7273 {
7374 self . curr_file = Some ( Box :: new ( stdin) ) ;
7475 }
You can’t perform that action at this time.
0 commit comments