blob: 833fec2b66e9e2a0f84333fad0339f54197d729e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Provide CC_MD5 on OS X < 10.5.
--- ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 23:20:33.000000000 +0100
+++ ld64-241.9/src/ld/OutputFile.cpp 2015-01-22 23:26:02.000000000 +0100
@@ -71,6 +71,19 @@
#include "LinkEdit.hpp"
#include "LinkEditClassic.hpp"
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+/* CC_MD5 missing on < 10.5 - provide replacement */
+unsigned char *CC_MD5(const void *data, CC_LONG len, unsigned char *md) {
+ CC_MD5_CTX ctx;
+ if(md == NULL)
+ return NULL;
+
+ CC_MD5_Init(&ctx);
+ CC_MD5_Update(&ctx, data, len);
+ CC_MD5_Final(md, &ctx);
+ return md;
+}
+#endif
namespace ld {
namespace tool {
|