diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index c1ca86b..0000000 --- a/.cargo/config +++ /dev/null @@ -1,2 +0,0 @@ -[build] -target = "x86_64-unknown-linux-musl" \ No newline at end of file diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..d67b66e --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "x86_64-unknown-linux-musl" diff --git a/src/lib.rs b/src/lib.rs index 1a91c69..74c4772 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -293,8 +293,8 @@ impl VsockStream { // https://github.com/rust-lang/libc/issues/1848 #[cfg_attr(target_env = "musl", allow(deprecated))] - let secs = if dur.as_secs() > libc::time_t::max_value() as u64 { - libc::time_t::max_value() + let secs = if dur.as_secs() > libc::time_t::MAX as u64 { + libc::time_t::MAX } else { dur.as_secs() as libc::time_t };