Skip to content

Commit 3a89d2d

Browse files
committed
Fix unresolved name error when building with musl.
1 parent 7a91a81 commit 3a89d2d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sys/signal.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,12 @@ impl SigEvent {
465465
SigevNotify::SigevSignal{..} => libc::SIGEV_SIGNAL,
466466
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
467467
SigevNotify::SigevKevent{..} => libc::SIGEV_KEVENT,
468-
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
469-
SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID
468+
#[cfg(target_os = "freebsd")]
469+
SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID,
470+
#[cfg(all(target_os = "linux", target_env = "gnu"))]
471+
SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID,
472+
#[cfg(all(target_os = "linux", target_env = "musl"))]
473+
SigevNotify::SigevThreadId{..} => 4 // No SIGEV_THREAD_ID defined
470474
};
471475
sev.sigev_signo = match sigev_notify {
472476
SigevNotify::SigevSignal{ signal, .. } => signal as ::c_int,

0 commit comments

Comments
 (0)