Skip to content

Commit

Permalink
Use weak linking for SecCopyErrorMessageString
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed May 18, 2021
1 parent 4e4b8bf commit 487d762
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

CFStringRef AppleCryptoNative_SecCopyErrorMessageString(OSStatus osStatus)
{
#if (defined(TARGET_IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_11_3) || (defined(TARGET_TVOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < __TVOS_11_3)
if (__builtin_available(iOS 11.3, tvOS 11.3, *))
{
return SecCopyErrorMessageString(osStatus, NULL);
}

return CFStringCreateWithFormat(NULL, NULL, CFSTR("OSStatus %d"), (int)osStatus);
#else
return SecCopyErrorMessageString(osStatus, NULL);
#endif
}

0 comments on commit 487d762

Please sign in to comment.