Skip to content

Commit d363faf

Browse files
authored
Fix building on Hermit (#30)
Signed-off-by: Martin Kröning <[email protected]>
1 parent f720869 commit d363faf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
2828
#![cfg_attr(unix, no_std)]
2929

30-
#[cfg(not(any(windows, target_os = "unknown")))]
30+
#[cfg(not(any(windows, target_os = "hermit", target_os = "unknown")))]
3131
use rustix::fd::AsFd;
3232
#[cfg(target_os = "hermit")]
33-
use std::os::hermit::io::AsRawFd;
33+
use std::os::hermit::io::AsFd;
3434
#[cfg(windows)]
3535
use std::os::windows::io::{AsHandle, AsRawHandle, BorrowedHandle};
3636
#[cfg(windows)]
@@ -80,7 +80,8 @@ impl<Stream: AsFd> IsTerminal for Stream {
8080

8181
#[cfg(target_os = "hermit")]
8282
{
83-
hermit_abi::isatty(self.as_fd().as_raw_fd())
83+
use std::os::hermit::io::AsRawFd;
84+
hermit_abi::isatty(self.as_fd().as_fd().as_raw_fd())
8485
}
8586
}
8687
}

0 commit comments

Comments
 (0)