| ... | ... | @@ -804,6 +804,8 @@ pub fn openFile(self: Dir, sub_path: []const u8, flags: File.OpenFlags) File.Ope |
| 804 | 804 | } |
| 805 | 805 | if (native_os == .wasi and !builtin.link_libc) { |
| 806 | 806 | var base: std.os.wasi.rights_t = .{}; |
| 807 | // POLL_FD_READWRITE only grants extra rights if the corresponding FD_READ and/or FD_WRITE |
| 808 | // is also set. |
| 807 | 809 | if (flags.isRead()) { |
| 808 | 810 | base.FD_READ = true; |
| 809 | 811 | base.FD_TELL = true; |
| ... | ... | @@ -984,6 +986,8 @@ pub fn createFile(self: Dir, sub_path: []const u8, flags: File.CreateFlags) File |
| 984 | 986 | .FD_FILESTAT_SET_TIMES = true, |
| 985 | 987 | .FD_FILESTAT_SET_SIZE = true, |
| 986 | 988 | .FD_FILESTAT_GET = true, |
| 989 | // POLL_FD_READWRITE only grants extra rights if the corresponding FD_READ and/or |
| 990 | // FD_WRITE is also set. |
| 987 | 991 | .POLL_FD_READWRITE = true, |
| 988 | 992 | }, .{}), |
| 989 | 993 | }; |