Browse Source

Correct syscalls for `linux_i386`

gingerBill 3 years ago
parent
commit
cb9e16f4df
2 changed files with 2 additions and 2 deletions
  1. 1 1
      core/os/os_linux.odin
  2. 1 1
      core/sys/unix/syscalls_linux.odin

+ 1 - 1
core/os/os_linux.odin

@@ -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
 	}
 	}
 }
 }

+ 1 - 1
core/sys/unix/syscalls_linux.odin

@@ -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
 	}
 	}
 }
 }