From 2409041e627012baa770acfd21c407ef9ba46777 Mon Sep 17 00:00:00 2001 From: Stephen Gregoratto Date: Fri, 29 Apr 2022 12:37:04 +1000 Subject: [PATCH] Seccomp fixups re: #10717 - Add type annotation for AUDIT.current. - Make unsupported archs a compile error. --- lib/std/os/linux.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index dd488edf42..de79091f53 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -5421,7 +5421,7 @@ pub const AUDIT = struct { const _64BIT = 0x80000000; const _LE = 0x40000000; - pub const current = switch (native_arch) { + pub const current: AUDIT.ARCH = switch (native_arch) { .i386 => .I386, .x86_64 => .X86_64, .aarch64 => .AARCH64, @@ -5433,7 +5433,7 @@ pub const AUDIT = struct { .powerpc => .PPC, .powerpc64 => .PPC64, .powerpc64le => .PPC64LE, - else => undefined, + else => @compileError("unsupported architecture"), }; AARCH64 = toAudit(.aarch64),