tools

various tools I have been using throughout the years
Log | Files | Refs | README | LICENSE

commit 113e50ec96488d23d39f72acc6f416ad0d8803e5
parent bd806ed479edbad249f384e04acb60cf248f2274
Author: mtmn <miro@haravara.org>
Date:   Thu,  9 Jul 2026 11:00:49 +0200

pracomer: fix build on darwin

Diffstat:
Mpracomer/src/signals.zig | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pracomer/src/signals.zig b/pracomer/src/signals.zig @@ -3,8 +3,8 @@ const builtin = @import("builtin"); var signal_pipe: [2]std.posix.fd_t = undefined; -fn signalHandler(sig: i32) callconv(.c) void { - const s: i32 = sig; +fn signalHandler(sig: std.c.SIG) callconv(.c) void { + const s: i32 = @bitCast(@intFromEnum(sig)); _ = std.c.write(signal_pipe[1], std.mem.asBytes(&s), @sizeOf(i32)); } @@ -19,8 +19,8 @@ pub fn open() !std.Io.File { const fd = try std.posix.signalfd(-1, &mask, std.os.linux.SFD.NONBLOCK); return .{ .handle = fd, .flags = .{ .nonblocking = false } }; } else { - const rc = std.c.pipe(&signal_pipe); - switch (std.posix.errno(@intCast(rc))) { + const rc: c_int = @intCast(std.c.pipe(&signal_pipe)); + switch (std.posix.errno(rc)) { .SUCCESS => {}, else => |err| return std.posix.unexpectedErrno(err), }