diff options
author | Alan Somers <asomers@gmail.com> | 2021-05-30 12:12:43 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-30 12:12:43 -0600 |
commit | 9f1b35b5d4a176ed7c09b576b461620c632c0182 (patch) | |
tree | 6ef9e9455c0d5e412ef8cd93171f6c42f916fd8f | |
parent | df9ed9314d61cc0598de60a401800a24f9c68850 (diff) | |
parent | cd6525f9814d2418d89559f6c82676439511dd6b (diff) | |
download | nix-9f1b35b5d4a176ed7c09b576b461620c632c0182.zip |
Merge pull request #1442 from asomers/issue-1441
Suppress a build warning on Fuchsia
-rw-r--r-- | src/sys/signal.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 3c1bd6d0..bf3f762b 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -850,10 +850,10 @@ mod sigevent { /// Linux, Solaris, and portable programs should prefer `SIGEV_THREAD_ID` or /// `SIGEV_SIGNAL`. That field is part of a union that shares space with the /// more genuinely useful `sigev_notify_thread_id` + // Allow invalid_value warning on Fuchsia only. + // See https://github.com/nix-rust/nix/issues/1441 + #[cfg_attr(target_os = "fuchsia", allow(invalid_value))] pub fn new(sigev_notify: SigevNotify) -> SigEvent { - // NB: This uses MaybeUninit rather than mem::zeroed because libc::sigevent contains a - // function pointer on Fuchsia as of https://github.com/rust-lang/libc/commit/2f59370, - // and function pointers must not be null. let mut sev = unsafe { mem::MaybeUninit::<libc::sigevent>::zeroed().assume_init() }; sev.sigev_notify = match sigev_notify { SigevNotify::SigevNone => libc::SIGEV_NONE, |