Skip to content

Commit

Permalink
Configure: added -Wno-deprecated-declarations on OS X.
Browse files Browse the repository at this point in the history
Previous workaround to avoid warnings on OS X due to deprecated system
OpenSSL library (introduced in a3870ea96ccd) no longer works, as
the MAC_OS_X_VERSION_MIN_REQUIRED macro is ignored on OS X 10.9
if a compiler used supports __attribute__(availability).
  • Loading branch information
mdounin committed May 28, 2014
1 parent ffe2177 commit e9a7011
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions auto/cc/clang
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ CFLAGS="$CFLAGS -Wconditional-uninitialized"
# we have a lot of unused function arguments
CFLAGS="$CFLAGS -Wno-unused-parameter"

# deprecated system OpenSSL library on OS X
if [ "$NGX_SYSTEM" = "Darwin" ]; then
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
fi

# stop on warning
CFLAGS="$CFLAGS -Werror"

Expand Down
5 changes: 5 additions & 0 deletions auto/cc/gcc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ case "$NGX_GCC_VER" in
CFLAGS="$CFLAGS -Wno-unused-parameter"
# 4.2.1 shows the warning in wrong places
#CFLAGS="$CFLAGS -Wunreachable-code"

# deprecated system OpenSSL library on OS X
if [ "$NGX_SYSTEM" = "Darwin" ]; then
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
fi
;;

*)
Expand Down
3 changes: 0 additions & 3 deletions src/os/unix/ngx_darwin_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#define _NGX_DARWIN_CONFIG_H_INCLUDED_


#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_0


#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
Expand Down

0 comments on commit e9a7011

Please sign in to comment.