authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:16:24+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:16:24+02:00
log59a501a9ac36a46fe4baa5d7245c3d64b0e13394
treed18087138f70700385550271185082fd2ae07f8a
parent43d019d3e0448e9556650d883ade1c6e92c91ff1
parent78093ce4c8a0a9d9dbf2679335e02636748c39c9

Merge pull request 'fix regressions caused by control data changes' (#37070) from hemisputnik/fix-control-data into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37070

2 files changed, 3 insertions(+), 4 deletions(-)

lib/std/Io/Threaded.zig+1-1
...@@ -12910,7 +12910,7 @@ fn netReadPosix(fd: net.Socket.Handle, data: [][]u8, control: []u8) net.Stream.R...@@ -12910,7 +12910,7 @@ fn netReadPosix(fd: net.Socket.Handle, data: [][]u8, control: []u8) net.Stream.R
12910 switch (std.os.wasi.fd_read(fd, dest.ptr, dest.len, &n)) {12910 switch (std.os.wasi.fd_read(fd, dest.ptr, dest.len, &n)) {
12911 .SUCCESS => {12911 .SUCCESS => {
12912 syscall.finish();12912 syscall.finish();
12913 return n;12913 return .{ .data_len = n };
12914 },12914 },
12915 .INTR => {12915 .INTR => {
12916 try syscall.checkCancel();12916 try syscall.checkCancel();
lib/std/Io/net.zig+2-3
...@@ -1283,11 +1283,10 @@ pub const Stream = struct {...@@ -1283,11 +1283,10 @@ pub const Stream = struct {
1283 /// This is a low-level API that calls the `Io` interface function directly.1283 /// This is a low-level API that calls the `Io` interface function directly.
1284 /// For a higher level API, see `reader`.1284 /// For a higher level API, see `reader`.
1285 pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize {1285 pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize {
1286 const rc, _ = try (try io.operate(.{ .net_read = .{1286 return (try (try io.operate(.{ .net_read = .{
1287 .socket_handle = s.socket.handle,1287 .socket_handle = s.socket.handle,
1288 .data = data,1288 .data = data,
1289 } })).net_read;1289 } })).net_read).data_len;
1290 return rc;
1291 }1290 }
12921291
1293 /// Read with control data.1292 /// Read with control data.