authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-07-30 23:22:06+01:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-07-30 23:22:06+01:00
logf5e938433555fb8cb0719d63e842ea26d012bb1d
tree5a7d7437df586609307d248253623d596c4e9a5f
parent467a1f4a1c58bc17b80e8af88ac8c7f6ba3d2035

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 files changed, 5 insertions(+), 5 deletions(-)

lib/std/c.zig+5-5
......@@ -8760,10 +8760,10 @@ 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,
......@@ -8771,7 +8771,7 @@ pub const MAP = switch (native_os) {
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};