From: Brendan Hansen Date: Mon, 7 Dec 2020 19:34:30 +0000 (-0600) Subject: bugfix in wasi.onyx X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=4f0e8d36709ba7c840ab85a6a69ecc3ed4a3a13a;p=onyx.git bugfix in wasi.onyx --- diff --git a/core/wasi.onyx b/core/wasi.onyx index 53a9dacc..2821cd10 100644 --- a/core/wasi.onyx +++ b/core/wasi.onyx @@ -207,7 +207,7 @@ OFlags :: enum #flags (u16) { Trunc; } -LinkCount :: #type u64; +LinkCount :: #type u32; FileStat :: struct { dev : Device; @@ -219,8 +219,15 @@ FileStat :: struct { // is a C header file, that is itself incorrect. nlink does // not exist in the current version of wasmtime, and should // not be here, but maybe in the future? Ugh. + // + // STILL ANGERY(Brendan Hansen): Actually, nlink does exist + // in the current version of wasmtime; however its actually + // a 32-bit value, not 64-bit, which means the offsets were + // incorrect. I fixed it for now, but when wasmtime updates + // the size of 'LinkCount' needs to be changed. // - brendanfh 2020/12/05 - // nlink : LinkCount; + // - brendanfh 2020/12/07 + nlink : LinkCount; size : Filesize; atim : Timestamp;