std.os.linux.MAP: use a packed struct

Introduces type safety to this constant. Eliminates one use of
`usingnamespace`.
This commit is contained in:
Andrew Kelley
2024-02-06 21:12:11 -07:00
parent 3da6043e2c
commit 9f3165540e
20 changed files with 146 additions and 154 deletions

View File

@@ -1652,7 +1652,7 @@ fn mapWholeFile(file: File) ![]align(mem.page_size) const u8 {
null,
file_len,
os.PROT.READ,
os.MAP.SHARED,
.{ .TYPE = .SHARED },
file.handle,
0,
);