aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
authorGabriel Borrelli <borrelli.gabriel.pr@gmail.com>2025-02-19 23:53:31 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2025-02-20 20:42:24 +0100
commit8e293ea8bd7fb7f6161604e9e4f4c21525d68827 (patch)
treebc4e1169a4037a11995a16a04b0ba1d870d9f2d6 /lib/std/c.zig
parentdbc886fd04328391598880c8d5abe8443b514a02 (diff)
downloadzig-8e293ea8bd7fb7f6161604e9e4f4c21525d68827.tar.gz
zig-8e293ea8bd7fb7f6161604e9e4f4c21525d68827.zip
std.c: define MADV for darwin
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 32579c04d0..498e7d14ca 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -1360,6 +1360,20 @@ pub const KERN = switch (native_os) {
pub const MADV = switch (native_os) {
.linux => linux.MADV,
.emscripten => emscripten.MADV,
+ .macos, .ios, .tvos, .watchos, .visionos => struct {
+ pub const NORMAL = 0;
+ pub const RANDOM = 1;
+ pub const SEQUENTIAL = 2;
+ pub const WILLNEED = 3;
+ pub const DONTNEED = 4;
+ pub const FREE = 5;
+ pub const ZERO_WIRED_PAGES = 6;
+ pub const FREE_REUSABLE = 7;
+ pub const FREE_REUSE = 8;
+ pub const CAN_REUSE = 9;
+ pub const PAGEOUT = 10;
+ pub const ZERO = 11;
+ },
.freebsd => struct {
pub const NORMAL = 0;
pub const RANDOM = 1;