authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-13 20:36:47+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-13 20:36:47+01:00
logd9e9390550e8290c1959ad2a8940e94d56f3ae1e
tree4df52f68c7269127095f0a60a0ef9e52d57dadfc
parentbb72b0e800518863f4bd7fc459fedb7f90d8e9e5

Fix compilation error on OpenBSD


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

lib/std/os/bits/openbsd.zig+9-9
...@@ -750,6 +750,8 @@ const NSIG = 33;...@@ -750,6 +750,8 @@ const NSIG = 33;
750pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));750pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
751pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);751pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
752pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);752pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
753pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2);
754pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3);
753755
754/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.756/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
755pub const Sigaction = extern struct {757pub const Sigaction = extern struct {
...@@ -772,7 +774,7 @@ pub const sigval = extern union {...@@ -772,7 +774,7 @@ pub const sigval = extern union {
772 ptr: ?*c_void,774 ptr: ?*c_void,
773};775};
774776
775pub const siginfo_t = extern union {777pub const siginfo_t = extern struct {
776 signo: c_int,778 signo: c_int,
777 code: c_int,779 code: c_int,
778 errno: c_int,780 errno: c_int,
...@@ -790,22 +792,20 @@ pub const siginfo_t = extern union {...@@ -790,22 +792,20 @@ pub const siginfo_t = extern union {
790 trapno: c_int,792 trapno: c_int,
791 },793 },
792 __pad: [128 - 3 * @sizeOf(c_int)]u8,794 __pad: [128 - 3 * @sizeOf(c_int)]u8,
793 } align(@sizeOf(usize)),795 },
794};796};
795797
796comptime {798comptime {
797 std.debug.assert(@sizeOf(siginfo_t) == 128);799 if (@sizeOf(usize) == 4)
800 std.debug.assert(@sizeOf(siginfo_t) == 128)
801 else
802 // Take into account the padding between errno and data fields.
803 std.debug.assert(@sizeOf(siginfo_t) == 136);
798}804}
799805
800pub const sigset_t = c_uint;806pub const sigset_t = c_uint;
801pub const empty_sigset: sigset_t = 0;807pub const empty_sigset: sigset_t = 0;
802808
803pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
804pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
805pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
806pub const SIG_CATCH = @intToPtr(?Sigaction.sigaction_fn, 2);
807pub const SIG_HOLD = @intToPtr(?Sigaction.sigaction_fn, 3);
808
809pub const EPERM = 1; // Operation not permitted809pub const EPERM = 1; // Operation not permitted
810pub const ENOENT = 2; // No such file or directory810pub const ENOENT = 2; // No such file or directory
811pub const ESRCH = 3; // No such process811pub const ESRCH = 3; // No such process