From 2a6e6504a3ae379d80fb9c4bd19250382b9180ad Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 31 Mar 2017 23:48:02 +0200 Subject: Update source code compatibility * Remove forward SDK declaration for 10.8 and below (since that is the minimum required development SDK) * Fix one case where a method unconditionally required a 10.9+ runtime * Move all of the forward/backward hacks into their own file --- Source/SPFunctions.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/SPFunctions.m') diff --git a/Source/SPFunctions.m b/Source/SPFunctions.m index 93008059..461304e0 100644 --- a/Source/SPFunctions.m +++ b/Source/SPFunctions.m @@ -44,11 +44,10 @@ void SPMainQSync(void (^block)(void)) int SPBetterRandomBytes(uint8_t *buf, size_t count) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_7 if([SPOSInfo isOSVersionAtLeastMajor:10 minor:7 patch:0]) { return SecRandomCopyBytes(kSecRandomDefault, count, buf); } -#endif + // Version for 10.6 // https://developer.apple.com/library/prerelease/mac/documentation/Security/Conceptual/cryptoservices/RandomNumberGenerationAPIs/RandomNumberGenerationAPIs.html#//apple_ref/doc/uid/TP40011172-CH12-SW1 FILE *fp = fopen("/dev/random", "r"); -- cgit v1.2.3