mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Merge pull request #25927 from lalinsky/netbsd-madv
Fix madvice/msync flags for BSDs
This commit is contained in:
commit
250803661c
1 changed files with 20 additions and 1 deletions
|
|
@ -1599,6 +1599,15 @@ pub const MADV = switch (native_os) {
|
||||||
pub const SEQUENTIAL = 0x5;
|
pub const SEQUENTIAL = 0x5;
|
||||||
pub const RANDOM = 0x6;
|
pub const RANDOM = 0x6;
|
||||||
},
|
},
|
||||||
|
.netbsd, .openbsd => 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,
|
else => void,
|
||||||
};
|
};
|
||||||
pub const MCL = switch (native_os) {
|
pub const MCL = switch (native_os) {
|
||||||
|
|
@ -1631,7 +1640,17 @@ pub const MSF = switch (native_os) {
|
||||||
pub const DEACTIVATE = 0x8;
|
pub const DEACTIVATE = 0x8;
|
||||||
pub const SYNC = 0x10;
|
pub const SYNC = 0x10;
|
||||||
},
|
},
|
||||||
.openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd => struct {
|
.freebsd, .dragonfly => struct {
|
||||||
|
pub const SYNC = 0;
|
||||||
|
pub const ASYNC = 1;
|
||||||
|
pub const INVALIDATE = 2;
|
||||||
|
},
|
||||||
|
.openbsd => struct {
|
||||||
|
pub const ASYNC = 1;
|
||||||
|
pub const SYNC = 2;
|
||||||
|
pub const INVALIDATE = 4;
|
||||||
|
},
|
||||||
|
.haiku, .netbsd, .illumos => struct {
|
||||||
pub const ASYNC = 1;
|
pub const ASYNC = 1;
|
||||||
pub const INVALIDATE = 2;
|
pub const INVALIDATE = 2;
|
||||||
pub const SYNC = 4;
|
pub const SYNC = 4;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue