Fix bindings for sys/linux and posix/unistd.odin

This commit is contained in:
gingerBill
2025-01-31 08:37:43 +00:00
parent 5d758cd020
commit 539a74c2a9
2 changed files with 213 additions and 173 deletions
+2 -2
View File
@@ -2010,10 +2010,10 @@ statfs :: proc "contextless" (path: cstring, statfs: ^Stat_FS) -> (Errno) {
*/
fstatfs :: proc "contextless" (fd: Fd, statfs: ^Stat_FS) -> (Errno) {
when size_of(int) == 8 {
ret := syscall(SYS_statfs, fd, statfs)
ret := syscall(SYS_fstatfs, fd, statfs)
return Errno(-ret)
} else {
ret := syscall(SYS_statfs64, fd, size_of(Stat_FS), statfs)
ret := syscall(SYS_fstatfs64, fd, size_of(Stat_FS), statfs)
return Errno(-ret)
}
}