summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-03-05 13:13:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-03-05 13:13:07 -0800
commite591339ce7632f3c9000f0fde8ee4813f061a11e (patch)
tree8b66ac8d098d5a6888ba93cdd82cca9e332cefa3
parentMerge branch 'jc/conf-var-doc' into maint (diff)
parentgit-compat-util: do not step on MAC_OS_X_VERSION_MIN_REQUIRED (diff)
downloadtgif-e591339ce7632f3c9000f0fde8ee4813f061a11e.tar.xz
Merge branch 'es/squelch-openssl-warnings-on-macosx' into maint
An earlier workaround to squelch unhelpful deprecation warnings from the complier on Mac OSX unnecessarily set minimum required version of the OS, which the user might want to raise (or lower) for other reasons. * es/squelch-openssl-warnings-on-macosx: git-compat-util: do not step on MAC_OS_X_VERSION_MIN_REQUIRED
-rw-r--r--git-compat-util.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 553fc01762..2ce96d5cb7 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -212,12 +212,15 @@ extern char *gitbasename(char *);
#endif
#ifndef NO_OPENSSL
+#ifdef __APPLE__
#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
-#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
+#include <AvailabilityMacros.h>
+#undef DEPRECATED_ATTRIBUTE
+#define DEPRECATED_ATTRIBUTE
+#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
+#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
-#undef MAC_OS_X_VERSION_MIN_REQUIRED
-#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
#ifdef NO_HMAC_CTX_CLEANUP
#define HMAC_CTX_cleanup HMAC_cleanup
#endif