From 5a6ee6235125c7d08a7b357e93c5acdde6536e62 Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Thu, 28 Jan 2021 20:45:31 +0800 Subject: [PATCH] Suppress time_t musl "deprecation" See rust-lang/libc#1848 in which this type is changing from i32 to i64; the change is being announced via this deprecation. Signed-off-by: Tim Zhang --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 8e60a72..bb1eeb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -395,6 +395,8 @@ impl VsockStream { )); } + // https://github.com/rust-lang/libc/issues/1848 + #[cfg_attr(target_env = "musl", allow(deprecated))] let secs = if dur.as_secs() > time_t::max_value() as u64 { time_t::max_value() } else {