aboutsummaryrefslogtreecommitdiffstats
path: root/ext/digest
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-12 18:47:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-12 18:47:06 +0900
commitf4055647115f2003ce614dd16cf68d2933f811fe (patch)
treeee9742555f01dd8a6b30e6774ddc20762f179c6a /ext/digest
parent04333da7beb3e50daf5f53ef7fe24b253a1a26ef (diff)
downloadruby-f4055647115f2003ce614dd16cf68d2933f811fe.tar.gz
Suppress deprecation warnings of MD5 from Xcode 11.1
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/md5/md5cc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/digest/md5/md5cc.h b/ext/digest/md5/md5cc.h
index 35652eac6a..e34d7d5c11 100644
--- a/ext/digest/md5/md5cc.h
+++ b/ext/digest/md5/md5cc.h
@@ -1,6 +1,13 @@
#define COMMON_DIGEST_FOR_OPENSSL 1
#include <CommonCrypto/CommonDigest.h>
+#ifdef __clang__
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+/* Suppress deprecation warnings of MD5 from Xcode 11.1 */
+/* Although we know MD5 is deprecated too, provide just for backward
+ * compatibility, as well as Apple does. */
+#endif
+
#define MD5_BLOCK_LENGTH CC_MD5_BLOCK_BYTES
static DEFINE_UPDATE_FUNC_FOR_UINT(MD5)