From b8a8c88572cb0195aa274ed7bf07a6fe2fba1b06 Mon Sep 17 00:00:00 2001 From: Piotr Gregor Date: Sun, 7 Feb 2016 23:37:37 +0000 Subject: [PATCH] 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. --- configure.ac | 1 + src/mod/applications/mod_avmd/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1085d7cb9c..8544f3c4b8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/mod/applications/mod_avmd/Makefile.am b/src/mod/applications/mod_avmd/Makefile.am index 0387fee18f..ce877babf7 100644 --- a/src/mod/applications/mod_avmd/Makefile.am +++ b/src/mod/applications/mod_avmd/Makefile.am @@ -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