Skip to content

Commit 0488a83

Browse files
committed
Auto merge of #2968 - name1e5s:macos_clocks, r=JohnTitor
add missing clockid_t on macOS See https://github.com/apple-open-source-mirror/Libc/blob/master/include/time.h#L205
2 parents e96f3ab + 35e3a43 commit 0488a83

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

libc-test/semver/macos-aarch64.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
__darwin_arm_exception_state64
22
__darwin_arm_neon_state64
3-
__darwin_arm_thread_state64
4-
CLOCK_UPTIME_RAW
3+
__darwin_arm_thread_state64

libc-test/semver/macos.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
CLOCK_MONOTONIC_RAW
2+
CLOCK_MONOTONIC_RAW_APPROX
3+
CLOCK_UPTIME_RAW
4+
CLOCK_UPTIME_RAW_APPROX
15
clock_settime
26
memmem
37
task_set_info

src/unix/bsd/apple/b64/aarch64/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ s! {
66
}
77
}
88

9-
pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
10-
119
cfg_if! {
1210
if #[cfg(libc_align)] {
1311
mod align;

src/unix/bsd/apple/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,7 +2694,11 @@ pub const ABMON_11: ::nl_item = 43;
26942694
pub const ABMON_12: ::nl_item = 44;
26952695

26962696
pub const CLOCK_REALTIME: ::clockid_t = 0;
2697+
pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4;
2698+
pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5;
26972699
pub const CLOCK_MONOTONIC: ::clockid_t = 6;
2700+
pub const CLOCK_UPTIME_RAW: ::clockid_t = 8;
2701+
pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9;
26982702
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12;
26992703
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16;
27002704

0 commit comments

Comments
 (0)