FS-8809 fix MAP_POPULATE undeclared

Add AM_MOD_AVMD_CXXFLAGS compile flag to mod avmd
and set this flag to -std=gnu99 in configure.ac
in case compiler vendor is xgnu.
This commit is contained in:
Piotr Gregor 2016-02-07 23:37:37 +00:00
parent f04a935ff9
commit b8a8c88572
2 changed files with 2 additions and 1 deletions

View File

@ -408,6 +408,7 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
AC_SUBST([AM_MOD_AVMD_CXXFLAGS], [-std=gnu99]) # FS-8809, needed for MAP_POPULATE
if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
fi

View File

@ -3,6 +3,6 @@ MODNAME=mod_avmd
mod_LTLIBRARIES = mod_avmd.la
mod_avmd_la_SOURCES = mod_avmd.c amplitude.c buffer.c desa2.c goertzel.c fast_acosf.c
mod_avmd_la_CFLAGS = $(AM_CFLAGS)
mod_avmd_la_CFLAGS = $(AM_CFLAGS) $(AM_MOD_AVMD_CXXFLAGS)
mod_avmd_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_avmd_la_LDFLAGS = -avoid-version -module -no-undefined -shared