]> granicus.if.org Git - curl/commitdiff
metalink: Un-broke the build when building --with-darwinssl
authorNick Zitzmann <nick@chronosnet.com>
Tue, 7 Aug 2012 23:08:54 +0000 (17:08 -0600)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Aug 2012 09:16:26 +0000 (11:16 +0200)
src/tool_metalink.c

index 3a24a1556bc7d22a5bad9c049479f15aaf1a9c39..6e4a31c43bbaf58d310727ad95cabd3149a8481f 100644 (file)
 #  define MD5_CTX    gcry_md_hd_t
 #  define SHA_CTX    gcry_md_hd_t
 #  define SHA256_CTX gcry_md_hd_t
+#elif defined(USE_DARWINSSL)
+/* For darwinssl: CommonCrypto has the functions we need. The library's
+   headers are even backward-compatible with OpenSSL's headers as long as
+   we define COMMON_DIGEST_FOR_OPENSSL first.
+
+   These functions are available on Tiger and later, as well as iOS 5.0
+   and later. If you're building for an older cat, well, sorry. */
+#  define COMMON_DIGEST_FOR_OPENSSL
+#  include <CommonCrypto/CommonDigest.h>
 #else
 #  error "Can't compile METALINK support without a crypto library."
 #endif