diff options
author | Michael Neumann <mneumann@ntecs.de> | 2015-09-09 20:16:42 +0200 |
---|---|---|
committer | Michael Neumann <mneumann@ntecs.de> | 2015-09-09 20:16:42 +0200 |
commit | f37e45628e44d86c16a6f02b38ea0a9d68e8b3d4 (patch) | |
tree | 3757e147ff4e9b4d30f493e63dec27e2eeebd6a7 /src/sys/signal.rs | |
parent | fad667e4e2c72889b55bcc7a21d87fa72218e101 (diff) | |
download | nix-f37e45628e44d86c16a6f02b38ea0a9d68e8b3d4.zip |
Add/Fix support for DragonFly BSD
Diffstat (limited to 'src/sys/signal.rs')
-rw-r--r-- | src/sys/signal.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 4a54c5d4..5f51bd11 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -241,15 +241,22 @@ pub mod signal { #[cfg(any(target_os = "macos", target_os = "ios", target_os = "openbsd"))] pub type sigset_t = u32; - #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] + #[cfg(target_os = "freebsd")] #[repr(C)] #[derive(Clone, Copy)] pub struct sigset_t { bits: [u32; 4], } + #[cfg(target_os = "dragonfly")] + #[repr(C)] + #[derive(Clone, Copy)] + pub struct sigset_t { + bits: [libc::c_uint; 4], + } // This structure has more fields, but we're not all that interested in // them. + #[cfg(not(target_os = "dragonfly"))] #[repr(C)] #[derive(Clone, Copy)] pub struct siginfo { @@ -261,6 +268,18 @@ pub mod signal { pub status: libc::c_int, } + #[cfg(target_os = "dragonfly")] + #[repr(C)] + #[derive(Clone, Copy)] + pub struct siginfo { + pub si_signo: libc::c_int, + pub si_errno: libc::c_int, + pub si_code: libc::c_int, + pub pid: libc::c_int, + pub uid: libc::c_uint, + pub status: libc::c_int, + } + #[cfg(any(target_os = "macos", target_os = "ios"))] #[repr(C)] #[allow(missing_copy_implementations)] |