This also limits the amount of code where deprecation warnings are
suppressed.
Previously these warnings were only suppressed in the cmake build.
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
ENDIF(MSVC)
-IF(APPLE)
- # CC_MD5_Init() functions are deprecated on macOS 10.15, but we want to use them
- ADD_DEFINITIONS(-Wno-deprecated-declarations)
-ENDIF(APPLE)
-
OPTION(DONT_FAIL_ON_CRC_ERROR "Ignore CRC errors during parsing (For fuzzing)" OFF)
IF(DONT_FAIL_ON_CRC_ERROR)
ADD_DEFINITIONS(-DDONT_FAIL_ON_CRC_ERROR=1)
#elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM)
+// These functions are available in macOS 10.4 and later, but deprecated from 10.15 onwards.
+// We need to continue supporting this feature regardless, so suppress the warnings.
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
static int
__archive_md5init(archive_md5_ctx *ctx)
{
return (ARCHIVE_OK);
}
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS)
static int