From de1de5a0786f2babbec28464bc7d01dac1bac4a8 Mon Sep 17 00:00:00 2001 From: "yuhaixin.hx" Date: Tue, 18 Oct 2022 10:36:39 +0800 Subject: [PATCH] add missing clockid_t on macOS --- libc-test/semver/macos.txt | 4 ++++ src/unix/bsd/apple/mod.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libc-test/semver/macos.txt b/libc-test/semver/macos.txt index 1babb4a5eb99b..048c8a120329b 100644 --- a/libc-test/semver/macos.txt +++ b/libc-test/semver/macos.txt @@ -1,3 +1,7 @@ +CLOCK_MONOTONIC_RAW +CLOCK_MONOTONIC_RAW_APPROX +CLOCK_UPTIME_RAW +CLOCK_UPTIME_RAW_APPROX clock_settime memmem task_set_info diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index ed30286953516..8a7e2f1f09e01 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -2694,7 +2694,11 @@ pub const ABMON_11: ::nl_item = 43; pub const ABMON_12: ::nl_item = 44; pub const CLOCK_REALTIME: ::clockid_t = 0; +pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; +pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5; pub const CLOCK_MONOTONIC: ::clockid_t = 6; +pub const CLOCK_UPTIME_RAW: ::clockid_t = 8; +pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9; pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12; pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16;