summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-03 23:38:48 +0000
committerbors <bors@rust-lang.org>2023-04-03 23:38:48 +0000
commit04078d9833c5bc8d57e4acbe626d52a68c89cfd1 (patch)
treeaa9b4fc9d2e821d3d02a3ae5ceb3e94e7f47b835
parent2dc31a7f72b64d04346f0f1f4bb7e57cafd1ad5d (diff)
parentf932d5c7b57ff863adaa8b8eb27794dfe2ccc9f9 (diff)
downloadrust-libc-04078d9833c5bc8d57e4acbe626d52a68c89cfd1.tar.gz
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…
-rw-r--r--src/unix/aix/powerpc64.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/unix/aix/powerpc64.rs b/src/unix/aix/powerpc64.rs
index 1f96ae37ad..6c6b87db74 100644
--- a/src/unix/aix/powerpc64.rs
+++ b/src/unix/aix/powerpc64.rs
@@ -192,6 +192,29 @@ s_no_extra_traits! {
}
}
+impl siginfo_t {
+ pub unsafe fn si_addr(&self) -> *mut ::c_void {
+ self.si_addr
+ }
+
+ #[cfg(libc_union)]
+ pub unsafe fn si_value(&self) -> ::sigval {
+ self.si_value
+ }
+
+ pub unsafe fn si_pid(&self) -> ::pid_t {
+ self.si_pid
+ }
+
+ pub unsafe fn si_uid(&self) -> ::uid_t {
+ self.si_uid
+ }
+
+ pub unsafe fn si_status(&self) -> ::c_int {
+ self.si_status
+ }
+}
+
cfg_if! {
if #[cfg(feature = "extra_traits")] {
#[cfg(libc_union)]