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

@@ -1237,7 +1237,7 @@ const LinuxThreadImpl = struct {
null,
map_bytes,
os.PROT.NONE,
os.MAP.PRIVATE | os.MAP.ANONYMOUS,
.{ .TYPE = .PRIVATE, .ANONYMOUS = true },
-1,
0,
) catch |err| switch (err) {