From 3a08d2f162de86e2613392c78e75df3b3a19aaf8 Mon Sep 17 00:00:00 2001 From: Lukas Lalinsky Date: Fri, 14 Nov 2025 17:48:19 +0100 Subject: [PATCH] Define std.c.MADV for NetBSD The `.netbsd` branch was completely missing. Validated against the actual system headers. --- lib/std/c.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/std/c.zig b/lib/std/c.zig index bfda9c31c9..57852d4830 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -1599,6 +1599,15 @@ pub const MADV = switch (native_os) { pub const SEQUENTIAL = 0x5; pub const RANDOM = 0x6; }, + .netbsd => struct { + pub const NORMAL = 0; + pub const RANDOM = 1; + pub const SEQUENTIAL = 2; + pub const WILLNEED = 3; + pub const DONTNEED = 4; + pub const SPACEAVAIL = 5; + pub const FREE = 6; + }, else => void, }; pub const MCL = switch (native_os) {