mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 07:03:11 +00:00
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) ```
This commit is contained in:
parent
701a6f394c
commit
a76851b2ef
@ -3355,15 +3355,15 @@ pub const Sigaction = switch (native_os) {
|
|||||||
},
|
},
|
||||||
// https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L39-L46
|
// https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L39-L46
|
||||||
.serenity => extern struct {
|
.serenity => extern struct {
|
||||||
pub const handler_fn = *align(1) const fn (c_int) callconv(.c) void;
|
pub const handler_fn = *align(1) const fn (i32) callconv(.c) void;
|
||||||
pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*anyopaque) callconv(.c) void;
|
pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void;
|
||||||
|
|
||||||
handler: extern union {
|
handler: extern union {
|
||||||
handler: ?handler_fn,
|
handler: ?handler_fn,
|
||||||
sigaction: ?sigaction_fn,
|
sigaction: ?sigaction_fn,
|
||||||
},
|
},
|
||||||
mask: sigset_t,
|
mask: sigset_t,
|
||||||
flags: c_int,
|
flags: c_uint,
|
||||||
},
|
},
|
||||||
else => void,
|
else => void,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user