From dd0962d5ea62742de50c62065856580d340e6cab Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Thu, 13 Oct 2022 23:24:23 -0700 Subject: [PATCH] Add wasi branch to MAX_NAME_BYTES --- lib/std/fs.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/fs.zig b/lib/std/fs.zig index 8f9e3767e4..8fedfd75b3 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -59,6 +59,8 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) { // If it would require 4 UTF-8 bytes, then there would be a surrogate // pair in the UTF-16LE, and we (over)account 3 bytes for it that way. .windows => os.windows.NAME_MAX * 3, + // TODO work out what a reasonable value we should use here + .wasi => 1024, else => if (@hasDecl(root, "os") and @hasDecl(root.os, "NAME_MAX")) root.os.NAME_MAX else