diff --git a/src/posix/poll.rs b/src/posix/poll.rs index f8a59bac..c1f79698 100644 --- a/src/posix/poll.rs +++ b/src/posix/poll.rs @@ -63,6 +63,11 @@ fn poll_clamped(fd: &mut PollFd, timeout: Duration) -> nix::Result { } #[cfg(any(target_os = "linux", test))] +// The type time_t is deprecaten on musl. The nix crate internally uses this type and makes an +// exeption for the deprecation for musl. And so do we. +// +// See // https://github.com/rust-lang/libc/issues/1848. +#[cfg_attr(target_env = "musl", allow(deprecated))] fn clamped_time_spec(duration: Duration) -> TimeSpec { use nix::libc::c_long; use nix::sys::time::time_t;