From 2cfff24f6d59402ef3616c1e5d253e1ab1c77867 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 12 Dec 2013 13:26:31 -0800 Subject: Supress the deprecation warnings by including an __APPLE__ only preamble. --- cryptography/hazmat/bindings/openssl/backend.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 +# 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"], ) -- cgit v1.2.3