summaryrefslogtreecommitdiff
path: root/src/sys/signal.rs
diff options
context:
space:
mode:
authorMichael Neumann <mneumann@ntecs.de>2015-09-09 20:16:42 +0200
committerMichael Neumann <mneumann@ntecs.de>2015-09-09 20:16:42 +0200
commitf37e45628e44d86c16a6f02b38ea0a9d68e8b3d4 (patch)
tree3757e147ff4e9b4d30f493e63dec27e2eeebd6a7 /src/sys/signal.rs
parentfad667e4e2c72889b55bcc7a21d87fa72218e101 (diff)
downloadnix-f37e45628e44d86c16a6f02b38ea0a9d68e8b3d4.zip
Add/Fix support for DragonFly BSD
Diffstat (limited to 'src/sys/signal.rs')
-rw-r--r--src/sys/signal.rs21
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)]