Skip to content

Commit 309ac27

Browse files
committed
std.c: Fix sigrtmin()/sigrtmax() for FreeBSD and NetBSD.
They just define the constants in the system headers.
1 parent 3d2b0a5 commit 309ac27

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/std/c.zig

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10385,12 +10385,20 @@ pub const sigaction = switch (native_os) {
1038510385

1038610386
/// Zig's version of SIGRTMIN. Actually a function.
1038710387
pub 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.
1039210396
pub 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

1039610404
pub const sigfillset = switch (native_os) {

0 commit comments

Comments
 (0)