summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2020-07-16 16:40:12 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2020-07-19 10:34:52 +0200
commit2998749850f88d83d2ce291bc8f0a8b5e33e9599 (patch)
treee84ec39d6516fe1e1f034aa1197dacc4333d5597 /lib
parent3c4c4ec2ee1c6101734b9cecc161910dc33dab5f (diff)
downloadcurl-2998749850f88d83d2ce291bc8f0a8b5e33e9599.tar.gz
md(4|5): don't use deprecated macOS functions
They are marked as deprecated for -mmacosx-version-min >= 10.15, which might result in warnings-as-errors. Closes https://github.com/curl/curl/pull/5695
Diffstat (limited to 'lib')
-rw-r--r--lib/md4.c4
-rw-r--r--lib/md5.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/md4.c b/lib/md4.c
index 0fab52def..67119cda5 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -102,7 +102,9 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
#include <openssl/md4.h>
#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
- (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) && \
+ defined(__MAC_OS_X_VERSION_MIN_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MIN_ALLOWED < 101500)) || \
(defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
(__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))
diff --git a/lib/md5.c b/lib/md5.c
index 557a51e6c..d21625f6b 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -139,7 +139,9 @@ static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
}
#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
- (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)) || \
+ (__MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) && \
+ defined(__MAC_OS_X_VERSION_MIN_ALLOWED) && \
+ (__MAC_OS_X_VERSION_MIN_ALLOWED < 101500)) || \
(defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && \
(__IPHONE_OS_VERSION_MAX_ALLOWED >= 20000))