diff options
| author | Linus Groh <mail@linusgroh.de> | 2025-07-30 23:22:06 +0100 |
|---|---|---|
| committer | Linus Groh <mail@linusgroh.de> | 2025-07-30 23:22:06 +0100 |
| commit | f5e938433555fb8cb0719d63e842ea26d012bb1d (patch) | |
| tree | 5a7d7437df586609307d248253623d596c4e9a5f /lib/std | |
| parent | 467a1f4a1c58bc17b80e8af88ac8c7f6ba3d2035 (diff) | |
| download | zig-f5e938433555fb8cb0719d63e842ea26d012bb1d.tar.gz zig-f5e938433555fb8cb0719d63e842ea26d012bb1d.zip | |
std.c: Fix MAP for serenity
I accidentally translated MAP_ constants representing the type as
individual fields. MAP_FILE is for compatibility only and not needed
here.
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/c.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig index a12312ba39..b9a659cae6 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -8760,10 +8760,10 @@ pub const MAP = switch (native_os) { }, // https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L16-L26 .serenity => packed struct(c_int) { - FILE: bool = false, - SHARED: bool = false, - PRIVATE: bool = false, - _3: u2 = 0, + TYPE: enum(u4) { + SHARED = 0x01, + PRIVATE = 0x02, + }, FIXED: bool = false, ANONYMOUS: bool = false, STACK: bool = false, @@ -8771,7 +8771,7 @@ pub const MAP = switch (native_os) { RANDOMIZED: bool = false, PURGEABLE: bool = false, FIXED_NOREPLACE: bool = false, - _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 12) = 0, + _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 11) = 0, }, else => void, }; |
