std: fix build failure on wasm32-freestanding

This commit is contained in:
Andrew Kelley 2025-10-21 14:12:28 -07:00
parent 00a3123fbe
commit 2f26025690
2 changed files with 3 additions and 6 deletions

View File

@ -32,11 +32,7 @@ pub const Kind = Io.File.Kind;
/// the `touch` command, which would correspond to `0o644`. However, POSIX
/// libc implementations use `0o666` inside `fopen` and then rely on the
/// process-scoped "umask" setting to adjust this number for file creation.
pub const default_mode = switch (builtin.os.tag) {
.windows => 0,
.wasi => 0,
else => 0o666,
};
pub const default_mode: Mode = if (Mode == u0) 0 else 0o666;
/// Deprecated in favor of `Io.File.OpenError`.
pub const OpenError = Io.File.OpenError || error{WouldBlock};

View File

@ -52,8 +52,9 @@ else switch (native_os) {
pub const fd_t = void;
pub const uid_t = void;
pub const gid_t = void;
pub const mode_t = void;
pub const mode_t = u0;
pub const ino_t = void;
pub const IFNAMESIZE = {};
},
};