authorgravatar for ascottcameron@gmail.comAlex Cameron <ascottcameron@gmail.com> 2020-12-12 05:30:06+00:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-12-13 19:37:13+01:00
log75159229075a2932beec44d46bf6850d2e585d3c
tree44a7502a4b7d0ba02bea7aa091a1c3c92cda6fa0
parent3a759fdb17d034cef1699774a098edeff5fc47bc

Fix Sigaction struct on FreeBSD.


1 files changed, 39 insertions(+), 0 deletions(-)

lib/std/os/bits/freebsd.zig+39
...@@ -758,6 +758,43 @@ pub const Sigaction = extern struct {...@@ -758,6 +758,43 @@ pub const Sigaction = extern struct {
758 sa_mask: sigset_t,758 sa_mask: sigset_t,
759};759};
760760
761pub const __siginfo = extern struct {
762 si_signo: c_int,
763 si_errno: c_int,
764 si_code: c_int,
765 si_pid: pid_t,
766 si_uid: uid_t,
767 si_status: c_int,
768 si_addr: ?*c_void,
769 si_value: sigval,
770 _reason: extern union {
771 _fault: extern struct {
772 _trapno: c_int,
773 },
774 _timer: extern struct {
775 _timerid: c_int,
776 _overrun: c_int,
777 },
778 _mesgq: extern struct {
779 _mqd: c_int,
780 },
781 _poll: extern struct {
782 _band: c_long,
783 },
784 __spare__: extern struct {
785 __spare1__: c_long,
786 __spare2__: [7]c_int,
787 },
788 },
789};
790
791pub const sigval = extern union {
792 sival_int: c_int,
793 sival_ptr: ?*c_void,
794 sigval_int: c_int,
795 sigval_ptr: ?*c_void,
796};
797
761pub const _SIG_WORDS = 4;798pub const _SIG_WORDS = 4;
762pub const _SIG_MAXSIG = 128;799pub const _SIG_MAXSIG = 128;
763800
...@@ -778,6 +815,8 @@ pub const sigset_t = extern struct {...@@ -778,6 +815,8 @@ pub const sigset_t = extern struct {
778 __bits: [_SIG_WORDS]u32,815 __bits: [_SIG_WORDS]u32,
779};816};
780817
818pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS };
819
781pub const EPERM = 1; // Operation not permitted820pub const EPERM = 1; // Operation not permitted
782pub const ENOENT = 2; // No such file or directory821pub const ENOENT = 2; // No such file or directory
783pub const ESRCH = 3; // No such process822pub const ESRCH = 3; // No such process