Add missing flush functionality to os platforms

Platforms:
- FreeBSD
- Haiku
- Linux
- NetBSD
- OpenBSD
This commit is contained in:
Feoramund
2024-08-28 19:53:20 +02:00
committed by Laytan
parent 3ec4db212b
commit 0243647e15
6 changed files with 28 additions and 7 deletions
+1 -2
View File
@@ -584,8 +584,7 @@ close :: proc(fd: Handle) -> Error {
}
flush :: proc(fd: Handle) -> Error {
// do nothing
return nil
return _get_errno(unix.sys_fsync(int(fd)))
}
// If you read or write more than `SSIZE_MAX` bytes, result is implementation defined (probably an error).