Skip to content

Commit 744ea70

Browse files
committed
Merge branch 'es/squelch-openssl-warnings-on-macosx'
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
2 parents c0997fe + 88c03eb commit 744ea70

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

git-compat-util.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,15 @@ extern char *gitbasename(char *);
212212
#endif
213213

214214
#ifndef NO_OPENSSL
215+
#ifdef __APPLE__
215216
#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
216-
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
217+
#include <AvailabilityMacros.h>
218+
#undef DEPRECATED_ATTRIBUTE
219+
#define DEPRECATED_ATTRIBUTE
220+
#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
221+
#endif
217222
#include <openssl/ssl.h>
218223
#include <openssl/err.h>
219-
#undef MAC_OS_X_VERSION_MIN_REQUIRED
220-
#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
221224
#ifdef NO_HMAC_CTX_CLEANUP
222225
#define HMAC_CTX_cleanup HMAC_cleanup
223226
#endif

0 commit comments

Comments
 (0)