Skip to content

Commit 8e293ea

Browse files
GabeRealBalexrp
authored andcommitted
std.c: define MADV for darwin
1 parent dbc886f commit 8e293ea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/std/c.zig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,20 @@ pub const KERN = switch (native_os) {
13601360
pub const MADV = switch (native_os) {
13611361
.linux => linux.MADV,
13621362
.emscripten => emscripten.MADV,
1363+
.macos, .ios, .tvos, .watchos, .visionos => struct {
1364+
pub const NORMAL = 0;
1365+
pub const RANDOM = 1;
1366+
pub const SEQUENTIAL = 2;
1367+
pub const WILLNEED = 3;
1368+
pub const DONTNEED = 4;
1369+
pub const FREE = 5;
1370+
pub const ZERO_WIRED_PAGES = 6;
1371+
pub const FREE_REUSABLE = 7;
1372+
pub const FREE_REUSE = 8;
1373+
pub const CAN_REUSE = 9;
1374+
pub const PAGEOUT = 10;
1375+
pub const ZERO = 11;
1376+
},
13631377
.freebsd => struct {
13641378
pub const NORMAL = 0;
13651379
pub const RANDOM = 1;

0 commit comments

Comments
 (0)