Skip to content

Commit 04078d9

Browse files
committed
Auto merge of #3185 - valpackett:aix, r=JohnTitor
aix: add siginfo_t accessors for symmetry with other platforms On other platforms it's possible to call e.g. `si_status()`, it was missing on AIX. btw, the `#[cfg(libc_union)]` usage in the `siginfo_t` itself looks quite wrong…
2 parents 2dc31a7 + f932d5c commit 04078d9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/unix/aix/powerpc64.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,29 @@ s_no_extra_traits! {
192192
}
193193
}
194194

195+
impl siginfo_t {
196+
pub unsafe fn si_addr(&self) -> *mut ::c_void {
197+
self.si_addr
198+
}
199+
200+
#[cfg(libc_union)]
201+
pub unsafe fn si_value(&self) -> ::sigval {
202+
self.si_value
203+
}
204+
205+
pub unsafe fn si_pid(&self) -> ::pid_t {
206+
self.si_pid
207+
}
208+
209+
pub unsafe fn si_uid(&self) -> ::uid_t {
210+
self.si_uid
211+
}
212+
213+
pub unsafe fn si_status(&self) -> ::c_int {
214+
self.si_status
215+
}
216+
}
217+
195218
cfg_if! {
196219
if #[cfg(feature = "extra_traits")] {
197220
#[cfg(libc_union)]

0 commit comments

Comments
 (0)