From 12e5a6909f82694d6686d7bf5fd5bf9c7f369e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Fri, 16 Oct 2026 21:25:56 +0200 Subject: [PATCH] std.c.openbsd: define MAX_PAGE_SHIFT for all relevant architectures --- lib/std/c/openbsd.zig | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index fded9262aa84223647689b351f71df6cec2c3e66..ea5bbdc62972d3c0b3cc81514ae4e79bb42c7e10 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -285,9 +285,23 @@ pub const E = enum(u16) { _, }; -pub const MAX_PAGE_SHIFT = switch (builtin.cpu.arch) { - .x86 => 12, - .sparc64 => 13, +pub const MAX_PAGE_SHIFT = switch (builtin.target.cpu.arch) { + .alpha, + .sparc64, + => 13, + .arm, + .aarch64, + .hppa, + .m88k, + .powerpc, + .powerpc64, + .riscv64, + .sh, + .x86, + .x86_64, + => 12, + .mips64, + => 14, }; pub const PTHREAD_STACK_MIN = 1 << MAX_PAGE_SHIFT; -- 2.54.0