Add stubs for flush on platforms that didn't have it

This commit is contained in:
gingerBill
2024-08-04 15:07:24 +01:00
parent acb1ebddf6
commit bf948ab8ae
8 changed files with 38 additions and 6 deletions
+6
View File
@@ -205,6 +205,12 @@ close :: proc(fd: Handle) -> Errno {
err := wasi.fd_close(wasi.fd_t(fd))
return Platform_Error(err)
}
flush :: proc(fd: Handle) -> Error {
// do nothing
return nil
}
seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) {
n, err := wasi.fd_seek(wasi.fd_t(fd), wasi.filedelta_t(offset), wasi.whence_t(whence))
return i64(n), Platform_Error(err)