authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-03 00:27:34-06:00
committergravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-03 00:27:34-06:00
logea32a7d2bc395b268e7e5be4fccb3cdb91233e78
tree5deb26ad71a2f7cd58ba558553c08958d49dccd9
parent4dd0822a3680de84ce5e6fd2536ffc91e0aaefb1

Fix compile errors about adding error.FileLocksNotSupported


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

lib/std/fs.zig+1-1
...@@ -1550,7 +1550,7 @@ pub fn walkPath(allocator: *Allocator, dir_path: []const u8) !Walker {...@@ -1550,7 +1550,7 @@ pub fn walkPath(allocator: *Allocator, dir_path: []const u8) !Walker {
1550 return walker;1550 return walker;
1551}1551}
15521552
1553pub const OpenSelfExeError = os.OpenError || os.windows.CreateFileError || SelfExePathError || os.FcntlError;1553pub const OpenSelfExeError = os.OpenError || os.windows.CreateFileError || SelfExePathError || os.FlockError;
15541554
1555pub fn openSelfExe() OpenSelfExeError!File {1555pub fn openSelfExe() OpenSelfExeError!File {
1556 if (builtin.os.tag == .linux) {1556 if (builtin.os.tag == .linux) {
lib/std/os.zig+4-1
...@@ -3295,7 +3295,10 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP...@@ -3295,7 +3295,10 @@ pub fn realpathZ(pathname: [*:0]const u8, out_buffer: *[MAX_PATH_BYTES]u8) RealP
3295 return realpathW(&pathname_w, out_buffer);3295 return realpathW(&pathname_w, out_buffer);
3296 }3296 }
3297 if (builtin.os.tag == .linux and !builtin.link_libc) {3297 if (builtin.os.tag == .linux and !builtin.link_libc) {
3298 const fd = try openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0);3298 const fd = openZ(pathname, linux.O_PATH | linux.O_NONBLOCK | linux.O_CLOEXEC, 0) catch |err| switch (err) {
3299 error.FileLocksNotSupported => unreachable,
3300 else => |e| return e,
3301 };
3299 defer close(fd);3302 defer close(fd);
33003303
3301 var procfs_buf: ["/proc/self/fd/-2147483648".len:0]u8 = undefined;3304 var procfs_buf: ["/proc/self/fd/-2147483648".len:0]u8 = undefined;