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;
750750pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
751751pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
752752pub 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
754756/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
755757pub const Sigaction = extern struct {
......@@ -772,7 +774,7 @@ pub const sigval = extern union {
772774 ptr: ?*c_void,
773775};
774776
775pub const siginfo_t = extern union {
777pub const siginfo_t = extern struct {
776778 signo: c_int,
777779 code: c_int,
778780 errno: c_int,
......@@ -790,22 +792,20 @@ pub const siginfo_t = extern union {
790792 trapno: c_int,
791793 },
792794 __pad: [128 - 3 * @sizeOf(c_int)]u8,
793 } align(@sizeOf(usize)),
795 },
794796};
795797
796798comptime {
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);
798804}
799805
800806pub const sigset_t = c_uint;
801807pub 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
809809pub const EPERM = 1; // Operation not permitted
810810pub const ENOENT = 2; // No such file or directory
811811pub const ESRCH = 3; // No such process