Skip to content

Commit

Permalink
Implement si_addr
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed May 1, 2019
1 parent 7c2f669 commit 53591a6
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/unix/notbsd/linux/other/mod.rs
Expand Up @@ -48,14 +48,32 @@ s! {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
#[deprecated(since="0.2.54", note="Please leave a comment on https://github.com/rust-lang/libc/pull/1316 if you're using this field")]
#[deprecated(
since="0.2.54",
note="Please leave a comment on \
https://github.com/rust-lang/libc/pull/1316 if you're using \
this field"
)]
pub _pad: [::c_int; 29],
#[cfg(target_arch = "x86_64")]
_align: [u64; 0],
#[cfg(not(target_arch = "x86_64"))]
_align: [usize; 0],
}

impl siginfo_t {
pub unsafe fn si_addr(&self) -> *mut ::c_void {
#[repr(C)]
struct siginfo_sigfault {
_si_signo: ::c_int,
_si_errno: ::c_int,
_si_code: ::c_int,
si_addr: *mut ::c_void
}
(*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr
}
}

pub struct glob64_t {
pub gl_pathc: ::size_t,
pub gl_pathv: *mut *mut ::c_char,
Expand Down

0 comments on commit 53591a6

Please sign in to comment.