Add a fallback for sysctl kern.osproductversion for XNU 17 (macOS
10.13) and below, which do not provide this property.
Unfortunately, this means we have to take the detour via Darwin kernel
version again (at least for the fallback).
Differential D84892
[Darwin][compiler-rt] kern.osproductversion unavailable pre macOS 10.13 yln on Jul 29 2020, 2:57 PM. Authored by
Details Add a fallback for sysctl kern.osproductversion for XNU 17 (macOS Unfortunately, this means we have to take the detour via Darwin kernel
Diff Detail
Event TimelineComment Actions LGTM
|
If for some reason in the future we need the minor OS version too then we could use the kern.osversion sysctl. Right now we don't need it for those older OSs AFAIK so let's go with your approach.