File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/unix/notbsd/linux/other Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 4848 pub si_signo: :: c_int,
4949 pub si_errno: :: c_int,
5050 pub si_code: :: c_int,
51+ #[ deprecated(
52+ since="0.2.54" ,
53+ note="Please leave a comment on \
54+ https://github.com/rust-lang/libc/pull/1316 if you're using \
55+ this field"
56+ ) ]
5157 pub _pad: [ :: c_int; 29 ] ,
5258 #[ cfg( target_arch = "x86_64" ) ]
5359 _align: [ u64 ; 0 ] ,
@@ -194,6 +200,19 @@ s! {
194200 }
195201}
196202
203+ impl siginfo_t {
204+ pub unsafe fn si_addr ( & self ) -> * mut :: c_void {
205+ #[ repr( C ) ]
206+ struct siginfo_sigfault {
207+ _si_signo : :: c_int ,
208+ _si_errno : :: c_int ,
209+ _si_code : :: c_int ,
210+ si_addr : * mut :: c_void
211+ }
212+ ( * ( self as * const siginfo_t as * const siginfo_sigfault ) ) . si_addr
213+ }
214+ }
215+
197216s_no_extra_traits ! {
198217 pub struct utmpx {
199218 pub ut_type: :: c_short,
You can’t perform that action at this time.
0 commit comments