build: update to Zig 0.15

This commit is contained in:
Isaac Freund
2025-07-11 18:08:50 +02:00
parent 63542fdf3e
commit d72408df18
37 changed files with 323 additions and 274 deletions

View File

@ -17,7 +17,7 @@
const std = @import("std");
const posix = std.posix;
const c = @import("c.zig");
const c = @import("c.zig").c;
var original_rlimit: ?posix.rlimit = null;
@ -26,7 +26,7 @@ pub fn setup() void {
// has had its read end closed by another process.
const sig_ign = posix.Sigaction{
.handler = .{ .handler = posix.SIG.IGN },
.mask = posix.empty_sigset,
.mask = posix.sigemptyset(),
.flags = 0,
};
posix.sigaction(posix.SIG.PIPE, &sig_ign, null);
@ -61,11 +61,11 @@ pub fn setup() void {
pub fn cleanupChild() void {
if (c.setsid() < 0) unreachable;
if (posix.system.sigprocmask(posix.SIG.SETMASK, &posix.empty_sigset, null) < 0) unreachable;
if (posix.system.sigprocmask(posix.SIG.SETMASK, &posix.sigemptyset(), null) < 0) unreachable;
const sig_dfl = posix.Sigaction{
.handler = .{ .handler = posix.SIG.DFL },
.mask = posix.empty_sigset,
.mask = posix.sigemptyset(),
.flags = 0,
};
posix.sigaction(posix.SIG.PIPE, &sig_dfl, null);