zig

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

commit 5bc99dd7e8c037aa6c5f46d779fba99163d1da36 (tree)
parent b96882c57a20d3f9f19640dbb6b2483d7dea5dfe
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Mon, 29 Jun 2020 18:28:28 +0200

Fix more compilation errors

Diffstat:
Mlib/std/os.zig | 1+
Mlib/std/zig/system.zig | 4++++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git 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 @@ -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,