You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
From this PR Add tvOS and watchOS support, identical to iOS support, iOS, tvOS, and watchOS are the same thing, though I have no idea how we can test whether clock_settime is available on iOS, libc does not have a CI for it
SteveLauC
changed the title
Enable most macos functions on all of apple_family
Enable most macos functions on all of apple_targets
Dec 1, 2023
Well, it seems that this symbol is not available on iOS/tvOS/watchOS, from the PR that added it for macOS:
Looking at time.h for macOS 11.5 clock_settime still doesn't seem to be exported for iOS. Declaring it only for macOS (using rust-lang/libc#2208 as an example of how).
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 thatclock_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.
The text was updated successfully, but these errors were encountered: