mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Fix compile error for old versions of GCC.
Use -Wno-format-truncation only if supported by compiler. ASTERISK-27171 #close Change-Id: Iac0aed7a5bcaa16c21b7d62c4e4678d244c4ccb6
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -1252,6 +1252,16 @@ else
|
||||
fi
|
||||
AC_SUBST(AST_NO_STRICT_OVERFLOW)
|
||||
|
||||
AC_MSG_CHECKING(for -Wno-format-truncation)
|
||||
if $(${CC} -O2 -Wno-format-truncation -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
AC_MSG_RESULT(yes)
|
||||
AST_NO_FORMAT_TRUNCATION=-Wno-format-truncation
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AST_NO_FORMAT_TRUNCATION=
|
||||
fi
|
||||
AC_SUBST(AST_NO_FORMAT_TRUNCATION)
|
||||
|
||||
AC_MSG_CHECKING(for -Wshadow)
|
||||
if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
Reference in New Issue
Block a user