diff options
author | bors <bors@rust-lang.org> | 2021-11-02 23:31:40 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-11-02 23:31:40 +0000 |
commit | fa6f26beaf4a435b9c7865e7ee42fa0ed66119df (patch) | |
tree | c7274c3ed723cfcef3d45e80911f81f5aac6fdf7 | |
parent | 5e7cda08b8b73f3eb8b344eecbe95fa117223a70 (diff) | |
parent | 7a270820dae88d55081222688ca4083717beebda (diff) | |
download | rust-libc-fa6f26beaf4a435b9c7865e7ee42fa0ed66119df.tar.gz |
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).
-rw-r--r-- | libc-test/semver/macos.txt | 1 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libc-test/semver/macos.txt b/libc-test/semver/macos.txt index d6a91320b8..a80baf4731 100644 --- a/libc-test/semver/macos.txt +++ b/libc-test/semver/macos.txt @@ -1 +1,2 @@ +clock_settime memmem diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index f0f4d2864e..0183ae8152 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -5372,6 +5372,7 @@ pub unsafe fn mach_task_self() -> ::mach_port_t { cfg_if! { if #[cfg(target_os = "macos")] { extern "C" { + pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; pub fn memmem( haystack: *const ::c_void, haystacklen: ::size_t, |