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
@@ -447,8 +447,7 @@ close :: proc(fd: Handle) -> Error {
}
flush :: proc(fd: Handle) -> Error {
// do nothing
return nil
return cast(_Platform_Error)freebsd.fsync(cast(freebsd.Fd)fd)
}
// If you read or write more than `INT_MAX` bytes, FreeBSD returns `EINVAL`.