diff options
author | Homu <homu@barosl.com> | 2017-02-23 05:38:11 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2017-02-23 05:38:11 +0900 |
commit | 877fb71cfd9945bc754f85dcd9b37b623c8e34d1 (patch) | |
tree | bf204c711b56b33b880b1c0e836f4cee8f87498a | |
parent | e7629f3e91535464c5857820dfc18ac0795a6893 (diff) | |
parent | 3a89d2dee4a0025c28b44225c47d2111f0b47128 (diff) | |
download | nix-877fb71cfd9945bc754f85dcd9b37b623c8e34d1.zip |
Auto merge of #513 - yxd-hde:fix-musl, r=posborne
Fix unresolved name error when building with musl.
See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
-rw-r--r-- | src/sys/signal.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 2f1baefa..208a5ccc 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -465,8 +465,12 @@ impl SigEvent { SigevNotify::SigevSignal{..} => libc::SIGEV_SIGNAL, #[cfg(any(target_os = "dragonfly", target_os = "freebsd"))] SigevNotify::SigevKevent{..} => libc::SIGEV_KEVENT, - #[cfg(any(target_os = "linux", target_os = "freebsd"))] - SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID + #[cfg(target_os = "freebsd")] + SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID, + #[cfg(all(target_os = "linux", target_env = "gnu"))] + SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID, + #[cfg(all(target_os = "linux", target_env = "musl"))] + SigevNotify::SigevThreadId{..} => 4 // No SIGEV_THREAD_ID defined }; sev.sigev_signo = match sigev_notify { SigevNotify::SigevSignal{ signal, .. } => signal as ::c_int, |