diff options
author | David Reid <dreid@dreid.org> | 2013-12-12 13:26:31 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-12-12 13:26:31 -0800 |
commit | 2cfff24f6d59402ef3616c1e5d253e1ab1c77867 (patch) | |
tree | ba8052149c431bc451f0d79e86e5b97d55898cc3 | |
parent | 3029fe414a3dba0231a44e72ddfc398634c173de (diff) | |
download | cryptography-2cfff24f6d59402ef3616c1e5d253e1ab1c77867.tar.gz cryptography-2cfff24f6d59402ef3616c1e5d253e1ab1c77867.tar.bz2 cryptography-2cfff24f6d59402ef3616c1e5d253e1ab1c77867.zip |
Supress the deprecation warnings by including an __APPLE__ only preamble.
-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"], ) |