CFStringEncoding);
typedef void (*CFReleaseFuncTy)(CFTypeRef);
+extern __attribute__((weak_import))
+bool _availability_version_check(uint32_t count,
+ dyld_build_version_t versions[]);
+
static void _initializeAvailabilityCheck(bool LoadPlist) {
if (AvailabilityVersionCheck && !LoadPlist) {
// New API is supported and we're not being asked to load the plist,
}
// Use the new API if it's is available.
- AvailabilityVersionCheck = (AvailabilityVersionCheckFuncTy)dlsym(
- RTLD_DEFAULT, "_availability_version_check");
+ if (_availability_version_check)
+ AvailabilityVersionCheck = &_availability_version_check;
if (AvailabilityVersionCheck && !LoadPlist) {
// New API is supported and we're not being asked to load the plist,