authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-10-03 22:19:25+01:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-10-03 22:19:25+01:00
loga76851b2ef8f22fb318573b33c973cf768423b5e
tree97422f6d7aa453810bc504a2b9d5f64eacdf1c7d
parent701a6f394cd96074a3258fc5545e7b278c13ef97

std.c: Also make Sigaction flags a c_uint for serenity

This matches all other platforms. Even if this field is defined as 'int' in the C definition, the expectation is that the full 32-bit unsigned integer range can be used. In particular this Sigaction initializer in the new std.debug code was causing a build failure: ```zig .flags = (posix.SA.SIGINFO | posix.SA.RESTART | posix.SA.RESETHAND) ```

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

lib/std/c.zig+3-3
...@@ -3355,15 +3355,15 @@ pub const Sigaction = switch (native_os) {...@@ -3355,15 +3355,15 @@ pub const Sigaction = switch (native_os) {
3355 },3355 },
3356 // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L39-L463356 // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L39-L46
3357 .serenity => extern struct {3357 .serenity => extern struct {
3358 pub const handler_fn = *align(1) const fn (c_int) callconv(.c) void;3358 pub const handler_fn = *align(1) const fn (i32) callconv(.c) void;
3359 pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*anyopaque) callconv(.c) void;3359 pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void;
33603360
3361 handler: extern union {3361 handler: extern union {
3362 handler: ?handler_fn,3362 handler: ?handler_fn,
3363 sigaction: ?sigaction_fn,3363 sigaction: ?sigaction_fn,
3364 },3364 },
3365 mask: sigset_t,3365 mask: sigset_t,
3366 flags: c_int,3366 flags: c_uint,
3367 },3367 },
3368 else => void,3368 else => void,
3369};3369};