authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-15 01:28:05+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-11-15 01:28:05+01:00
log250803661c2a3642c413e0ebb25475605093873e
treedb32382d5f5148d9ee325387a26cb699502a4941
parent06d08dababda8fde2fef8267698a712d1966045d
parent6bdea35ce543b1112bc48ccc30ae62f094d1aa2b
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #25927 from lalinsky/netbsd-madv

Fix madvice/msync flags for BSDs

1 files changed, 20 insertions(+), 1 deletions(-)

lib/std/c.zig+20-1
......@@ -1599,6 +1599,15 @@ pub const MADV = switch (native_os) {
15991599 pub const SEQUENTIAL = 0x5;
16001600 pub const RANDOM = 0x6;
16011601 },
1602 .netbsd, .openbsd => struct {
1603 pub const NORMAL = 0;
1604 pub const RANDOM = 1;
1605 pub const SEQUENTIAL = 2;
1606 pub const WILLNEED = 3;
1607 pub const DONTNEED = 4;
1608 pub const SPACEAVAIL = 5;
1609 pub const FREE = 6;
1610 },
16021611 else => void,
16031612};
16041613pub const MCL = switch (native_os) {
......@@ -1631,7 +1640,17 @@ pub const MSF = switch (native_os) {
16311640 pub const DEACTIVATE = 0x8;
16321641 pub const SYNC = 0x10;
16331642 },
1634 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd => struct {
1643 .freebsd, .dragonfly => struct {
1644 pub const SYNC = 0;
1645 pub const ASYNC = 1;
1646 pub const INVALIDATE = 2;
1647 },
1648 .openbsd => struct {
1649 pub const ASYNC = 1;
1650 pub const SYNC = 2;
1651 pub const INVALIDATE = 4;
1652 },
1653 .haiku, .netbsd, .illumos => struct {
16351654 pub const ASYNC = 1;
16361655 pub const INVALIDATE = 2;
16371656 pub const SYNC = 4;