Fix sys/linux 64 bit arguments on 32 bit systems

Reverese return values of compat64_arg_pair
Add register alignment to specific arm32 system calls
This commit is contained in:
jason
2025-01-02 14:50:45 -05:00
parent ce1f3b34c0
commit 074bef7baf
3 changed files with 24 additions and 6 deletions
+3
View File
@@ -80,6 +80,9 @@ _open :: proc(name: string, flags: File_Flags, perm: int) -> (f: ^File, err: Err
// terminal would be incredibly rare. This has no effect on files while
// allowing us to open serial devices.
sys_flags: linux.Open_Flags = {.NOCTTY, .CLOEXEC}
when size_of(rawptr) == 4 {
sys_flags += {.LARGEFILE}
}
switch flags & (O_RDONLY|O_WRONLY|O_RDWR) {
case O_RDONLY:
case O_WRONLY: sys_flags += {.WRONLY}