From 4f0e8d36709ba7c840ab85a6a69ecc3ed4a3a13a Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Mon, 7 Dec 2020 13:34:30 -0600 Subject: [PATCH] bugfix in wasi.onyx --- core/wasi.onyx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; -- 2.25.1