Skip to content

Commit f5e9384

Browse files
committed
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.
1 parent 467a1f4 commit f5e9384

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/std/c.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8760,18 +8760,18 @@ pub const MAP = switch (native_os) {
87608760
},
87618761
// https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L16-L26
87628762
.serenity => packed struct(c_int) {
8763-
FILE: bool = false,
8764-
SHARED: bool = false,
8765-
PRIVATE: bool = false,
8766-
_3: u2 = 0,
8763+
TYPE: enum(u4) {
8764+
SHARED = 0x01,
8765+
PRIVATE = 0x02,
8766+
},
87678767
FIXED: bool = false,
87688768
ANONYMOUS: bool = false,
87698769
STACK: bool = false,
87708770
NORESERVE: bool = false,
87718771
RANDOMIZED: bool = false,
87728772
PURGEABLE: bool = false,
87738773
FIXED_NOREPLACE: bool = false,
8774-
_: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 12) = 0,
8774+
_: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 11) = 0,
87758775
},
87768776
else => void,
87778777
};

0 commit comments

Comments
 (0)