diff options
author | Kyle J. McKay <mackyle@gmail.com> | 2015-02-06 01:35:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-09 14:09:21 -0800 |
commit | 88c03eb5775546a2cae0d8cc9025ef7969b23485 (patch) | |
tree | f646c28a2ac2496c8790516543f41a3c515a685e /git-compat-util.h | |
parent | b195aa00c17ea38d3f1c9125c37348645ea58f7c (diff) | |
download | git-88c03eb5775546a2cae0d8cc9025ef7969b23485.tar.gz |
git-compat-util: do not step on MAC_OS_X_VERSION_MIN_REQUIREDes/squelch-openssl-warnings-on-macosx
MAC_OS_X_VERSION_MIN_REQUIRED may be defined by the builder to a
specific version in order to produce compatible binaries for a
particular system. Blindly defining it to MAC_OS_X_VERSION_10_6
is bad.
Additionally MAC_OS_X_VERSION_10_6 will not be defined on older
systems and should AvailabilityMacros.h be included on such as
system an error will result. However, using the explicit value
of 1060 (which is what MAC_OS_X_VERSION_10_6 is defined to) does
not solve the problem.
The changes that introduced stepping on MAC_OS_X_VERSION_MIN were
made in b195aa00 (git-compat-util: suppress unavoidable
Apple-specific deprecation warnings) to avoid deprecation
warnings.
Instead of blindly setting MAC_OS_X_VERSION_MIN to 1060 change
the definition of DEPRECATED_ATTRIBUTE to empty to avoid the
warnings. This preserves any MAC_OS_X_VERSION_MIN_REQUIRED
setting while avoiding the warnings as intended by b195aa00.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 433b8f2a1d..46563326f0 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -211,12 +211,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 #endif /* On most systems <netdb.h> would have given us this, but |