Skip to content

Commit

Permalink
Suppress time_t musl "deprecation"
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Tim-Zhang committed Jan 28, 2021
1 parent 6f9886f commit 5a6ee62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5a6ee62

Please sign in to comment.