]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8809 fix MAP_POPULATE undeclared
authorPiotr Gregor <peterg@sytel.com>
Sun, 7 Feb 2016 23:37:37 +0000 (23:37 +0000)
committerPiotr Gregor <peterg@sytel.com>
Mon, 8 Feb 2016 23:02:22 +0000 (23:02 +0000)
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.

configure.ac
src/mod/applications/mod_avmd/Makefile.am

index 1085d7cb9cbaa58a3552fc818d453df353541139..8544f3c4b88fa193aa8ead41afbf85e506281df1 100644 (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
index 0387fee18fc0274f6fb75603c0e8156e2d57dc2d..ce877babf758bf1c8ecca38671b9f0c2c0c952d9 100644 (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