diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-29 15:47:47 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-29 16:48:28 +0200 |
| commit | 309ac27d35d92166e19be776db91789916e86109 (patch) | |
| tree | 4504bf487e931bf0659f5f5f2c9cb81de60fb4ef /lib/std/c.zig | |
| parent | 3d2b0a53fed3df37e8ff4261624631560380928c (diff) | |
| download | zig-309ac27d35d92166e19be776db91789916e86109.tar.gz zig-309ac27d35d92166e19be776db91789916e86109.zip | |
std.c: Fix sigrtmin()/sigrtmax() for FreeBSD and NetBSD.
They just define the constants in the system headers.
Diffstat (limited to 'lib/std/c.zig')
| -rw-r--r-- | lib/std/c.zig | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig index 69b4b443f1..365b852260 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -10385,12 +10385,20 @@ pub const sigaction = switch (native_os) { /// Zig's version of SIGRTMIN. Actually a function. pub fn sigrtmin() u8 { - return @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))); + return switch (native_os) { + .freebsd => 65, + .netbsd => 33, + else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmin()))), + }; } /// Zig's version of SIGRTMAX. Actually a function. pub fn sigrtmax() u8 { - return @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))); + return switch (native_os) { + .freebsd => 126, + .netbsd => 63, + else => @truncate(@as(c_uint, @bitCast(private.__libc_current_sigrtmax()))), + }; } pub const sigfillset = switch (native_os) { |
