Zig Version
0.10.0-dev.4425+f36aee93c
Steps to Reproduce
This code should ignore sigpipe signal. I'm pretty sure it was working
const std = @import("std");
pub fn main() !void {
var act = std.os.Sigaction{
.handler = .{ .handler = std.os.SIG.IGN },
.mask = std.os.empty_sigset,
.flags = 0,
};
try std.os.sigaction(std.os.SIG.PIPE, &act, null);
}
on aarch64 linux getting error:
/usr/local/zig/zig-linux-aarch64-0.10.0-dev.4425+f36aee93c/lib/zig/std/os/linux.zig:2037:54: error: pointer type '?*const fn(c_int) callconv(.C) void' requires aligned address
pub const IGN = @intToPtr(?Sigaction.handler_fn, 1);
and the same on Darwin aarch64:
/usr/local/zig/zig-macos-aarch64-0.10.0-dev.4324+c23b3e6fd/lib/std/c/darwin.zig:826:54: error: pointer type '?*const fn(c_int) callconv(.C) void' requires aligned address
pub const IGN = @intToPtr(?Sigaction.handler_fn, 1);
Expected Behavior
Compile without error.
This was compiling fine in zig-macos-aarch64-0.10.0-dev.4324+c23b3e6fd:
var act = os.Sigaction{
.handler = .{ .sigaction = os.SIG.IGN },
.mask = os.empty_sigset,
.flags = 0,
};
try os.sigaction(os.SIG.PIPE, &act, null);
Actual Behavior
Getting error pointer type '?*const fn(c_int) callconv(.C) void' requires aligned address.
Zig Version
0.10.0-dev.4425+f36aee93c
Steps to Reproduce
This code should ignore sigpipe signal. I'm pretty sure it was working
on aarch64 linux getting error:
and the same on Darwin aarch64:
Expected Behavior
Compile without error.
This was compiling fine in
zig-macos-aarch64-0.10.0-dev.4324+c23b3e6fd:Actual Behavior
Getting error
pointer type '?*const fn(c_int) callconv(.C) void' requires aligned address.