diff options
-rw-r--r-- | cryptography/hazmat/bindings/openssl/backend.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py index 1b19ddaa..d093684e 100644 --- a/cryptography/hazmat/bindings/openssl/backend.py +++ b/cryptography/hazmat/bindings/openssl/backend.py @@ -111,8 +111,19 @@ class Backend(object): # is legal, but the following will fail to compile: # int foo(int); # int foo(short); + + preamble = [ +""" +#ifdef __APPLE__ +# include <AvailabilityMacros.h> +# undef DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER +# define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER +#endif +""" + ] + lib = ffi.verify( - source="\n".join(includes + functions + customizations), + source="\n".join(preamble + includes + functions + customizations), libraries=["crypto", "ssl"], ) |