diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fb31b13..178d9ba2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,11 @@ if (CMAKE_COMPILER_IS_GNUCC) endif() endif() +if (APPLE) + # Get rid of deprecated warnings for OpenSSL on OSX 10.7 and greater. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations") +endif() + # Winsock. if(WIN32) set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h) diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index 1ce124f9..89fc7eaa 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -24,6 +24,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// Get rid of OSX 10.7 and greater deprecation warnings. +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include "event2/event-config.h" #include "evconfig-private.h" diff --git a/sample/https-client.c b/sample/https-client.c index 831576f3..165c5e69 100644 --- a/sample/https-client.c +++ b/sample/https-client.c @@ -10,6 +10,9 @@ Loosely based on le-proxy.c. */ +// Get rid of OSX 10.7 and greater deprecation warnings. +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include diff --git a/sample/le-proxy.c b/sample/le-proxy.c index afacd33f..a348bdb6 100644 --- a/sample/le-proxy.c +++ b/sample/le-proxy.c @@ -5,6 +5,9 @@ XXX It's a little ugly and should probably be cleaned up. */ +// Get rid of OSX 10.7 and greater deprecation warnings. +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #include #include #include diff --git a/sample/openssl_hostname_validation.c b/sample/openssl_hostname_validation.c index f2cd8564..1c95373d 100644 --- a/sample/openssl_hostname_validation.c +++ b/sample/openssl_hostname_validation.c @@ -34,6 +34,8 @@ SOFTWARE. * */ +// Get rid of OSX 10.7 and greater deprecation warnings. +#pragma clang diagnostic ignored "-Wdeprecated-declarations" #include #include diff --git a/test/regress_ssl.c b/test/regress_ssl.c index acf2bd67..60fe9639 100644 --- a/test/regress_ssl.c +++ b/test/regress_ssl.c @@ -24,6 +24,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// Get rid of OSX 10.7 and greater deprecation warnings. +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #ifdef _WIN32 #include #include