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) {...@@ -8760,10 +8760,10 @@ pub const MAP = switch (native_os) {
8760 },8760 },
8761 // https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L16-L268761 // https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L16-L26
8762 .serenity => packed struct(c_int) {8762 .serenity => packed struct(c_int) {
8763 FILE: bool = false,8763 TYPE: enum(u4) {
8764 SHARED: bool = false,8764 SHARED = 0x01,
8765 PRIVATE: bool = false,8765 PRIVATE = 0x02,
8766 _3: u2 = 0,8766 },
8767 FIXED: bool = false,8767 FIXED: bool = false,
8768 ANONYMOUS: bool = false,8768 ANONYMOUS: bool = false,
8769 STACK: bool = false,8769 STACK: bool = false,
...@@ -8771,7 +8771,7 @@ pub const MAP = switch (native_os) {...@@ -8771,7 +8771,7 @@ pub const MAP = switch (native_os) {
8771 RANDOMIZED: bool = false,8771 RANDOMIZED: bool = false,
8772 PURGEABLE: bool = false,8772 PURGEABLE: bool = false,
8773 FIXED_NOREPLACE: bool = false,8773 FIXED_NOREPLACE: bool = false,
8774 _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 12) = 0,8774 _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 11) = 0,
8775 },8775 },
8776 else => void,8776 else => void,
8777};8777};