Skip to content

Commit 980c513

Browse files
committed
stage1: fix wasi_snapshot_preview1_fd_seek on cache files
1 parent 512b863 commit 980c513

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DevEnv = @import("src/dev.zig").Env;
1212
const ValueInterpretMode = enum { direct, by_name };
1313

1414
const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 15, .patch = 0 };
15-
const stack_size = 46 * 1024 * 1024;
15+
const stack_size = 50 * 1024 * 1024;
1616

1717
pub fn build(b: *std.Build) !void {
1818
const only_c = b.option(bool, "only-c", "Translate the Zig compiler to C code, with only the C backend enabled") orelse false;

stage1/wasi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,8 @@ uint32_t wasi_snapshot_preview1_fd_seek(uint32_t fd, uint64_t in_offset, uint32_
10031003
default: panic("unimplemented");
10041004
}
10051005

1006+
if (fds[fd].stream == NULL) return wasi_errno_success;
1007+
10061008
int seek_whence;
10071009
switch (whence) {
10081010
case wasi_whence_set:

0 commit comments

Comments
 (0)