A quick search through libc shows that there's only one function we use that's defined on macos but isn't defined on tvos, watchos, and ios as well: clock_settime. Even that, I suspect, is a mistake, given that clock_gettime is defined for all of them.
We should replace #[cfg(target_os = macos)] with #[cfg(apple_targets)] everywhere.
Honestly, I don't know why Apple needs so many different Rust targets.