authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 15:47:47+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-29 16:48:28+02:00
log309ac27d35d92166e19be776db91789916e86109
tree4504bf487e931bf0659f5f5f2c9cb81de60fb4ef
parent3d2b0a53fed3df37e8ff4261624631560380928c
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: Fix sigrtmin()/sigrtmax() for FreeBSD and NetBSD.

They just define the constants in the system headers.

1 files changed, 10 insertions(+), 2 deletions(-)

lib/std/c.zig+10-2
......@@ -10385,12 +10385,20 @@ pub const sigaction = switch (native_os) {
1038510385
1038610386/// Zig's version of SIGRTMIN. Actually a function.
1038710387pub fn sigrtmin() u8 {
10388 return @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin())));
10388 return switch (native_os) {
10389 .freebsd => 65,
10390 .netbsd => 33,
10391 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))),
10392 };
1038910393}
1039010394
1039110395/// Zig's version of SIGRTMAX. Actually a function.
1039210396pub fn sigrtmax() u8 {
10393 return @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax())));
10397 return switch (native_os) {
10398 .freebsd => 126,
10399 .netbsd => 63,
10400 else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))),
10401 };
1039410402}
1039510403
1039610404pub const sigfillset = switch (native_os) {