diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2020-07-19 23:18:20 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2020-07-22 08:51:22 +0200 |
| commit | 2c9c13f624a48e6a22ae84b236eb131c24ba2eb4 (patch) | |
| tree | 6d8520a5dd8599c33510f12c77e5df97960fc50a /lib/std/os.zig | |
| parent | e0b77a6b77614538d18b9f0b9e3e7e434ccee4ff (diff) | |
| download | zig-2c9c13f624a48e6a22ae84b236eb131c24ba2eb4.tar.gz zig-2c9c13f624a48e6a22ae84b236eb131c24ba2eb4.zip | |
Add various build fixes
Fix WASI build, fix atomicSymlink by using `cwd().symLink`, add
`Dir.symLink` on supported targets.
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 86a5a7ad08..36f7669f66 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -1109,10 +1109,10 @@ pub fn openat(dir_fd: fd_t, file_path: []const u8, flags: u32, mode: mode_t) Ope } /// Open and possibly create a file in WASI. -pub fn openatWasi(dir_fd: fd_t, file_path: []const u8, oflags: oflags_t, fdflags: fdflags_t, base: rights_t, inheriting: rights_t) OpenError!fd_t { +pub fn openatWasi(dir_fd: fd_t, file_path: []const u8, lookup_flags: lookupflags_t, oflags: oflags_t, fdflags: fdflags_t, base: rights_t, inheriting: rights_t) OpenError!fd_t { while (true) { var fd: fd_t = undefined; - switch (wasi.path_open(dir_fd, 0x0, file_path.ptr, file_path.len, oflags, base, inheriting, fdflags, &fd)) { + switch (wasi.path_open(dir_fd, lookup_flags, file_path.ptr, file_path.len, oflags, base, inheriting, fdflags, &fd)) { wasi.ESUCCESS => return fd, wasi.EINTR => continue, |
