Skip to content

Commit

Permalink
Bump libc version and use CLOCK_UPTIME_RAW constant
Browse files Browse the repository at this point in the history
  • Loading branch information
lyinch committed Feb 19, 2022
1 parent 4a29682 commit 283ccc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1972,9 +1972,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"

[[package]]
name = "libc"
version = "0.2.116"
version = "0.2.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
dependencies = [
"rustc-std-workspace-core",
]
Expand Down
2 changes: 1 addition & 1 deletion library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
panic_unwind = { path = "../panic_unwind", optional = true }
panic_abort = { path = "../panic_abort" }
core = { path = "../core" }
libc = { version = "0.2.116", default-features = false, features = ['rustc-dep-of-std'] }
libc = { version = "0.2.119", default-features = false, features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "0.1.69" }
profiler_builtins = { path = "../profiler_builtins", optional = true }
unwind = { path = "../unwind" }
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/unix/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ mod inner {
impl Instant {
pub fn now() -> Instant {
#[cfg(target_os = "macos")]
const clock_id: clock_t = 8;
const clock_id: clock_t = libc::CLOCK_UPTIME_RAW;
#[cfg(not(target_os = "macos"))]
const clock_id: clock_t = libc::CLOCK_MONOTONIC;
Instant { t: now(clock_id) }
Expand Down

0 comments on commit 283ccc9

Please sign in to comment.