zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 5b9e6a2b2daf6b3c17adee4cea32d9319337dd2e (tree)
parent e19c686c22d6e1666244075909b9fe1993e1ee2b
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sat,  3 Jan 2026 10:31:32 -0800

compiler: fix wasi compilation

Diffstat:
Msrc/main.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -56,11 +56,11 @@ pub const panic = crash_report.panic; pub const debug = crash_report.debug; var wasi_preopens: fs.wasi.Preopens = undefined; -pub fn wasi_cwd() std.os.wasi.fd_t { +pub fn wasi_cwd() Io.Dir { // Expect the first preopen to be current working directory. const cwd_fd: std.posix.fd_t = 3; assert(mem.eql(u8, wasi_preopens.names[cwd_fd], ".")); - return cwd_fd; + return .{ .handle = cwd_fd }; } const fatal = std.process.fatal;