Skip to content

Commit

Permalink
Auto merge of rust-lang#513 - yxd-hde:fix-musl, r=posborne
Browse files Browse the repository at this point in the history
Fix unresolved name error when building with musl.

See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
  • Loading branch information
homu committed Feb 22, 2017
2 parents e7629f3 + 3a89d2d commit 877fb71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 877fb71

Please sign in to comment.