diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/sys/signal.rs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 02620c36..b3f21301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). (#[1739](https://github.com/nix-rust/nix/pull/1739)) - Changed `gethostname` to return an owned `OsString`. (#[1745](https://github.com/nix-rust/nix/pull/1745)) +- `signal:SigSet` is now marked as `repr(transparent)`. + (#[1741](https://github.com/nix-rust/nix/pull/1741)) ### Fixed diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 4ce09308..4a468b62 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -465,6 +465,9 @@ use std::iter::FromIterator; use std::iter::IntoIterator; /// Specifies a set of [`Signal`]s that may be blocked, waited for, etc. +// We are using `transparent` here to be super sure that `SigSet` +// is represented exactly like the `sigset_t` struct from C. +#[repr(transparent)] #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub struct SigSet { sigset: libc::sigset_t |