diff options
| author | Alex Cameron <ascottcameron@gmail.com> | 2020-12-12 05:30:06 +0000 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-12-13 19:37:13 +0100 |
| commit | 75159229075a2932beec44d46bf6850d2e585d3c (patch) | |
| tree | 44a7502a4b7d0ba02bea7aa091a1c3c92cda6fa0 /lib/std | |
| parent | 3a759fdb17d034cef1699774a098edeff5fc47bc (diff) | |
| download | zig-75159229075a2932beec44d46bf6850d2e585d3c.tar.gz zig-75159229075a2932beec44d46bf6850d2e585d3c.zip | |
Fix Sigaction struct on FreeBSD.
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/os/bits/freebsd.zig | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/std/os/bits/freebsd.zig b/lib/std/os/bits/freebsd.zig index feac7b354a..3a71218b37 100644 --- a/lib/std/os/bits/freebsd.zig +++ b/lib/std/os/bits/freebsd.zig @@ -758,6 +758,43 @@ pub const Sigaction = extern struct { sa_mask: sigset_t, }; +pub const __siginfo = extern struct { + si_signo: c_int, + si_errno: c_int, + si_code: c_int, + si_pid: pid_t, + si_uid: uid_t, + si_status: c_int, + si_addr: ?*c_void, + si_value: sigval, + _reason: extern union { + _fault: extern struct { + _trapno: c_int, + }, + _timer: extern struct { + _timerid: c_int, + _overrun: c_int, + }, + _mesgq: extern struct { + _mqd: c_int, + }, + _poll: extern struct { + _band: c_long, + }, + __spare__: extern struct { + __spare1__: c_long, + __spare2__: [7]c_int, + }, + }, +}; + +pub const sigval = extern union { + sival_int: c_int, + sival_ptr: ?*c_void, + sigval_int: c_int, + sigval_ptr: ?*c_void, +}; + pub const _SIG_WORDS = 4; pub const _SIG_MAXSIG = 128; @@ -778,6 +815,8 @@ pub const sigset_t = extern struct { __bits: [_SIG_WORDS]u32, }; +pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS }; + pub const EPERM = 1; // Operation not permitted pub const ENOENT = 2; // No such file or directory pub const ESRCH = 3; // No such process |
