authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-17 06:53:10+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-06-17 16:28:18+02:00
log386153612e4aab74b76c416eb96aa81dfca0c370
tree604feb29e889f3872d59938c2f18b4ae5c6e7a99
parent002ee8e6d38024b9a7db90347c3fb9189edd1bc8
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Io.Threaded: only use llseek() on Linux if @sizeOf(syscall_arg_t) == 4

The x32/n32 ABIs do not make this syscall available. closes https://codeberg.org/ziglang/zig/issues/35819

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/Io/Threaded.zig+2-2
......@@ -10195,7 +10195,7 @@ fn fileSeekBy(userdata: ?*anyopaque, file: File, offset: i64) File.SeekError!voi
1019510195
1019610196 if (posix.SEEK == void) return error.Unseekable;
1019710197
10198 if (native_os == .linux and !builtin.link_libc and @sizeOf(usize) == 4) {
10198 if (native_os == .linux and !builtin.link_libc and @sizeOf(posix.system.syscall_arg_t) == 4) {
1019910199 var result: i64 = undefined;
1020010200 const syscall: Syscall = try .start();
1020110201 while (true) {
......@@ -10307,7 +10307,7 @@ fn fileSeekTo(userdata: ?*anyopaque, file: File, offset: u64) File.SeekError!voi
1030710307}
1030810308
1030910309fn posixSeekTo(fd: posix.fd_t, offset: u64) File.SeekError!void {
10310 if (native_os == .linux and !builtin.link_libc and @sizeOf(usize) == 4) {
10310 if (native_os == .linux and !builtin.link_libc and @sizeOf(posix.system.syscall_arg_t) == 4) {
1031110311 const syscall: Syscall = try .start();
1031210312 while (true) {
1031310313 var result: i64 = undefined;