diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index f0562504fd..918b0f43f9 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -16796,6 +16796,7 @@ fn createFileMap( .OVERFLOW => return error.Unseekable, .BADF => return errnoBug(err), // Always a race condition. .INVAL => return errnoBug(err), // Invalid parameters to mmap() + .OPNOTSUPP => return errnoBug(err), // Bad flags with MAP.SHARED_VALIDATE on Linux. else => return posix.unexpectedErrno(err), } }; diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index f5868f71e9..501ba44557 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -146,6 +146,7 @@ pub const MAP_TYPE = enum(u4) { SHARED = 0x01, PRIVATE = 0x02, SHARED_VALIDATE = 0x03, + DROPPABLE = 0x08, }; pub const MAP = switch (native_arch) { diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 358d4ac469..26369d2ce9 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -12608,8 +12608,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std. } const int_info = switch (ty.zigTypeTag(zcu)) { .bool => Type.u1.intInfo(zcu), - .int, .@"enum", .error_set => ty.intInfo(zcu), - else => return null, + else => if (ty.isAbiInt(zcu)) ty.intInfo(zcu) else return null, }; return switch (target.os.tag) { .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => switch (int_info.bits) {