authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-12-01 14:48:09+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-12-01 14:48:09+02:00
logb7066b6024521f077d645c297879cce5f1ed563c
treec7102eafe246d954ea9f74cd0e738f2322d05fbf
parent829bf5a03e510e707de3c48a78bef2f35fe193a6

add workaround for compiler bug


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

lib/std/fs.zig+2
...@@ -809,6 +809,8 @@ pub const IterableDir = struct {...@@ -809,6 +809,8 @@ pub const IterableDir = struct {
809 // and we avoid the code complexity here.809 // and we avoid the code complexity here.
810 const w = os.wasi;810 const w = os.wasi;
811 start_over: while (true) {811 start_over: while (true) {
812 // TODO https://github.com/ziglang/zig/issues/12498
813 _ = @sizeOf(w.dirent_t) + 1;
812 // According to the WASI spec, the last entry might be truncated,814 // According to the WASI spec, the last entry might be truncated,
813 // so we need to check if the left buffer contains the whole dirent.815 // so we need to check if the left buffer contains the whole dirent.
814 if (self.end_index - self.index < @sizeOf(w.dirent_t)) {816 if (self.end_index - self.index < @sizeOf(w.dirent_t)) {