diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/os.zig | 1 | ||||
| -rw-r--r-- | lib/std/zig/system.zig | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index a7e29555d6..a1b3665845 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -4012,6 +4012,7 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP if (builtin.os.tag == .linux and !builtin.link_libc) { const fd = openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0) catch |err| switch (err) { error.FileLocksNotSupported => unreachable, + error.NotCapable => unreachable, // WASI only else => |e| return e, }; defer close(fd); diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 64c9401dbc..166dbf4c43 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -499,6 +499,7 @@ pub const NativeTargetInfo = struct { error.PipeBusy => unreachable, error.FileLocksNotSupported => unreachable, error.WouldBlock => unreachable, + error.NotCapable => unreachable, // we don't support WASI here (not yet at least) error.IsDir, error.NotDir, @@ -790,6 +791,7 @@ pub const NativeTargetInfo = struct { var it = mem.tokenize(rpath_list, ":"); while (it.next()) |rpath| { var dir = fs.cwd().openDir(rpath, .{}) catch |err| switch (err) { + error.NotCapable => unreachable, // we don't support WASI here (not yet at least) error.NameTooLong => unreachable, error.InvalidUtf8 => unreachable, error.BadPathName => unreachable, @@ -817,6 +819,7 @@ pub const NativeTargetInfo = struct { &link_buf, ) catch |err| switch (err) { error.NameTooLong => unreachable, + error.NotCapable => unreachable, // we don't support WASI here (not yet at least) error.AccessDenied, error.FileNotFound, @@ -851,6 +854,7 @@ pub const NativeTargetInfo = struct { const len = file.pread(buf[i .. buf.len - i], offset + i) catch |err| switch (err) { error.OperationAborted => unreachable, // Windows-only error.WouldBlock => unreachable, // Did not request blocking mode + error.NotCapable => unreachable, // WASI only, and we don't support it here yet error.SystemResources => return error.SystemResources, error.IsDir => return error.UnableToReadElfFile, error.BrokenPipe => return error.UnableToReadElfFile, |
