Skip to content

Commit 41907fb

Browse files
simonschoeningmkroening
authored andcommitted
Extending filesystem support for hermit-os
1 parent e270fc7 commit 41907fb

File tree

3 files changed

+232
-98
lines changed

3 files changed

+232
-98
lines changed

library/std/src/sys/hermit/fd.rs

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ impl FileDesc {
4848
pub fn set_nonblocking(&self, _nonblocking: bool) -> io::Result<()> {
4949
unsupported()
5050
}
51+
52+
pub fn fstat(&self, stat: *mut abi::stat) -> io::Result<()> {
53+
cvt(unsafe { abi::fstat(self.fd.as_raw_fd(), stat) })?;
54+
Ok(())
55+
}
5156
}
5257

5358
impl<'a> Read for &'a FileDesc {

0 commit comments

Comments
 (0)