authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-06-29 18:28:28+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-06-29 21:42:11+02:00
log5bc99dd7e8c037aa6c5f46d779fba99163d1da36
treecf12826d1c78add8ba0a08309f8de74ef57f76b3
parentb96882c57a20d3f9f19640dbb6b2483d7dea5dfe

Fix more compilation errors


2 files changed, 5 insertions(+), 0 deletions(-)

lib/std/os.zig+1
......@@ -4012,6 +4012,7 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP
40124012 if (builtin.os.tag == .linux and !builtin.link_libc) {
40134013 const fd = openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0) catch |err| switch (err) {
40144014 error.FileLocksNotSupported => unreachable,
4015 error.NotCapable => unreachable, // WASI only
40154016 else => |e| return e,
40164017 };
40174018 defer close(fd);
lib/std/zig/system.zig+4
......@@ -499,6 +499,7 @@ pub const NativeTargetInfo = struct {
499499 error.PipeBusy => unreachable,
500500 error.FileLocksNotSupported => unreachable,
501501 error.WouldBlock => unreachable,
502 error.NotCapable => unreachable, // we don't support WASI here (not yet at least)
502503
503504 error.IsDir,
504505 error.NotDir,
......@@ -790,6 +791,7 @@ pub const NativeTargetInfo = struct {
790791 var it = mem.tokenize(rpath_list, ":");
791792 while (it.next()) |rpath| {
792793 var dir = fs.cwd().openDir(rpath, .{}) catch |err| switch (err) {
794 error.NotCapable => unreachable, // we don't support WASI here (not yet at least)
793795 error.NameTooLong => unreachable,
794796 error.InvalidUtf8 => unreachable,
795797 error.BadPathName => unreachable,
......@@ -817,6 +819,7 @@ pub const NativeTargetInfo = struct {
817819 &link_buf,
818820 ) catch |err| switch (err) {
819821 error.NameTooLong => unreachable,
822 error.NotCapable => unreachable, // we don't support WASI here (not yet at least)
820823
821824 error.AccessDenied,
822825 error.FileNotFound,
......@@ -851,6 +854,7 @@ pub const NativeTargetInfo = struct {
851854 const len = file.pread(buf[i .. buf.len - i], offset + i) catch |err| switch (err) {
852855 error.OperationAborted => unreachable, // Windows-only
853856 error.WouldBlock => unreachable, // Did not request blocking mode
857 error.NotCapable => unreachable, // WASI only, and we don't support it here yet
854858 error.SystemResources => return error.SystemResources,
855859 error.IsDir => return error.UnableToReadElfFile,
856860 error.BrokenPipe => return error.UnableToReadElfFile,