Skip to content

Commit fa6f26b

Browse files
committed
Auto merge of #2496 - DimitrisJim:macos_settime, r=JohnTitor
Declare clock_settime for macOS. Looking at [time.h for macOS 11.5](https://opensource.apple.com/source/Libc/Libc-1439.141.1/include/time.h.auto.html) `clock_settime` still doesn't seem to be exported for iOS. Declaring it only for macOS (using #2208 as an example of how).
2 parents 5e7cda0 + 7a27082 commit fa6f26b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

libc-test/semver/macos.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
clock_settime
12
memmem

src/unix/bsd/apple/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5372,6 +5372,7 @@ pub unsafe fn mach_task_self() -> ::mach_port_t {
53725372
cfg_if! {
53735373
if #[cfg(target_os = "macos")] {
53745374
extern "C" {
5375+
pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
53755376
pub fn memmem(
53765377
haystack: *const ::c_void,
53775378
haystacklen: ::size_t,

0 commit comments

Comments
 (0)