authorgravatar for johnnymarler@gmail.comJonathan Marler <johnnymarler@gmail.com> 2022-05-14 08:30:29-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-05-26 19:50:10-04:00
logee1a95b555464d5a309992b06e02efd07770026c
tree3079f149403f6861472df2315140da91b0805489
parent4e918873e7667e8d74b009cb34cbdd4df3305462

fix semantic error with std.os.linux.all_mask

all_mask is a value of type sigset_t, which is defined as an array type [N]u32. However, all_mask references sigset_t.len, but, the array type does not have a len field. Fix is to use @typeInfo(sigset_t).Array.len instead.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+1-1
......@@ -3064,7 +3064,7 @@ pub const NSIG = if (is_mips) 128 else 65;
30643064
30653065pub const sigset_t = [1024 / 32]u32;
30663066
3067pub const all_mask: sigset_t = [_]u32{0xffffffff} ** sigset_t.len;
3067pub const all_mask: sigset_t = [_]u32{0xffffffff} ** @typeInfo(sigset_t).Array.len;
30683068pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffffffff} ** 30;
30693069
30703070const k_sigaction_funcs = if (builtin.zig_backend == .stage1) struct {