aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2024-01-30 23:11:52 +0200
committerVeikka Tuominen <git@vexu.eu>2024-02-01 15:22:36 +0200
commit8d11ade6a769fe498ed20cdb4f80c6acf4ca91de (patch)
tree3519793f8db0e05d0b9a4239a8b440381fbb1501 /src/main.zig
parentde9606bed51ed59530b5f9f98609aded14398b98 (diff)
downloadzig-8d11ade6a769fe498ed20cdb4f80c6acf4ca91de.tar.gz
zig-8d11ade6a769fe498ed20cdb4f80c6acf4ca91de.zip
std: change return type of `wasiCwd`
`fd_t` is not declared on freestanding so returning a `Dir` causes an error.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index a6bc747d2b..c3d5a28ccf 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -45,11 +45,11 @@ pub const std_options = .{
pub const panic = crash_report.panic;
var wasi_preopens: fs.wasi.Preopens = undefined;
-pub fn wasi_cwd() fs.Dir {
+pub fn wasi_cwd() std.os.wasi.fd_t {
// Expect the first preopen to be current working directory.
const cwd_fd: std.os.fd_t = 3;
assert(mem.eql(u8, wasi_preopens.names[cwd_fd], "."));
- return .{ .fd = cwd_fd };
+ return cwd_fd;
}
pub fn getWasiPreopen(name: []const u8) Compilation.Directory {