diff options
author | Brad King <brad.king@kitware.com> | 2015-10-21 14:46:37 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-26 10:20:51 -0400 |
commit | c7fcc6b295bfee50d280c4589f7667ff47754ac5 (patch) | |
tree | 53176ca25e30b3a5e82a52479d4a22a302dc4b24 /libarchive/archive_cryptor_private.h | |
parent | 844b006283d1dfbc4256f7c26434459040dad5d4 (diff) | |
download | libarchive-c7fcc6b295bfee50d280c4589f7667ff47754ac5.tar.gz |
Use CommonCrypto APIs on OS X only when available
Use each CommonCrypto API only when using an OS X SDK version new enough
to provide it.
Diffstat (limited to 'libarchive/archive_cryptor_private.h')
-rw-r--r-- | libarchive/archive_cryptor_private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libarchive/archive_cryptor_private.h b/libarchive/archive_cryptor_private.h index b62ec0c6..9a96aeea 100644 --- a/libarchive/archive_cryptor_private.h +++ b/libarchive/archive_cryptor_private.h @@ -31,6 +31,13 @@ #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #ifdef __APPLE__ +# include <AvailabilityMacros.h> +# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 +# define ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto +# endif +#endif + +#ifdef ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto #include <CommonCrypto/CommonCryptor.h> #include <CommonCrypto/CommonKeyDerivation.h> #define AES_BLOCK_SIZE 16 |