diff options
| author | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-03 00:27:34 -0600 |
|---|---|---|
| committer | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-03 00:27:34 -0600 |
| commit | ea32a7d2bc395b268e7e5be4fccb3cdb91233e78 (patch) | |
| tree | 5deb26ad71a2f7cd58ba558553c08958d49dccd9 /lib/std/os.zig | |
| parent | 4dd0822a3680de84ce5e6fd2536ffc91e0aaefb1 (diff) | |
| download | zig-ea32a7d2bc395b268e7e5be4fccb3cdb91233e78.tar.gz zig-ea32a7d2bc395b268e7e5be4fccb3cdb91233e78.zip | |
Fix compile errors about adding error.FileLocksNotSupported
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index e0e998a4a6..1df22b0456 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -3295,7 +3295,10 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP return realpathW(&pathname_w, out_buffer); } if (builtin.os.tag == .linux and !builtin.link_libc) { - const fd = try openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0); + const fd = openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0) catch |err| switch (err) { + error.FileLocksNotSupported => unreachable, + else => |e| return e, + }; defer close(fd); var procfs_buf: ["/proc/self/fd/-2147483648".len:0]u8 = undefined; |
