mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 12:48:14 +00:00
Correct syscalls for linux_i386
This commit is contained in:
@@ -311,7 +311,7 @@ _unix_seek :: proc(fd: Handle, offset: i64, whence: int) -> i64 {
|
|||||||
low := uintptr(offset & 0xFFFFFFFF)
|
low := uintptr(offset & 0xFFFFFFFF)
|
||||||
high := uintptr(offset >> 32)
|
high := uintptr(offset >> 32)
|
||||||
result: i64
|
result: i64
|
||||||
res := i64(intrinsics.syscall(unix.SYS__llseek, uintptr(fd), high, low, &result, uintptr(whence)))
|
res := i64(intrinsics.syscall(unix.SYS__llseek, uintptr(fd), high, low, uintptr(&result), uintptr(whence)))
|
||||||
return -1 if res < 0 else result
|
return -1 if res < 0 else result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1622,7 +1622,7 @@ sys_lseek :: proc "contextless" (fd: int, offset: i64, whence: int) -> i64 {
|
|||||||
low := uintptr(offset & 0xFFFFFFFF)
|
low := uintptr(offset & 0xFFFFFFFF)
|
||||||
high := uintptr(offset >> 32)
|
high := uintptr(offset >> 32)
|
||||||
result: i64
|
result: i64
|
||||||
res := i64(intrinsics.syscall(SYS__llseek, uintptr(fd), high, low, &result, uintptr(whence)))
|
res := i64(intrinsics.syscall(SYS__llseek, uintptr(fd), high, low, uintptr(&result), uintptr(whence)))
|
||||||
return res if res < 0 else result
|
return res if res < 0 else result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user