Sebastian Kemper

FS-10939 mod_cdr_mongodb: fix format truncation warnings with gcc 7

gcc 7 complains about possible format truncation:

mod_cdr_mongodb.c: In function 'my_on_reporting':

mod_cdr_mongodb.c:242:45: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Werror=format-truncation=]

snprintf(idx_buffer, sizeof(idx_buffer), "%d", callflow_idx);

The char * idx_buffer has a size of 4 Bytes, and according to gcc's

calculation it is possible that up to 11 Bytes might be copied into it

via int bson_idx.

This commit adds an extra 8 Bytes to char * idx_buffer, which silences

the warnings.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-10384 [mod_lua] Fix Makefile target

When running "make swigclean" in mod_lua directory and trying to compile

mod_lua afterward, the build fails because the target mod_lua_wrap.cpp

doesn't exist. The target is wrongly called lua_wrap instead.

making all mod_lua

make[7]: Entering directory '/path/to/freeswitch-1.6.17/src/mod/languages/mod_lua'

CXX mod_lua_la-mod_lua.lo

CXX mod_lua_la-freeswitch_lua.lo

make[7]: *** No rule to make target 'mod_lua_wrap.cpp', needed by 'mod_lua_la-mod_lua_wrap.lo'. Stop.

Fix this by renaming lua_wrap to mod_lua_wrap.cpp.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

    • -2
    • +2
    /src/mod/languages/mod_lua/Makefile.am
FS-10384 [mod_lua] Fix Makefile target

When running "make swigclean" in mod_lua directory and trying to compile

mod_lua afterward, the build fails because the target mod_lua_wrap.cpp

doesn't exist. The target is wrongly called lua_wrap instead.

making all mod_lua

make[7]: Entering directory '/path/to/freeswitch-1.6.17/src/mod/languages/mod_lua'

CXX mod_lua_la-mod_lua.lo

CXX mod_lua_la-freeswitch_lua.lo

make[7]: *** No rule to make target 'mod_lua_wrap.cpp', needed by 'mod_lua_la-mod_lua_wrap.lo'. Stop.

Fix this by renaming lua_wrap to mod_lua_wrap.cpp.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

    • -2
    • +2
    /src/mod/languages/mod_lua/Makefile.am
FS-10056: Fix modcheck.sh invokation

modcheck.sh gets called by build/Makefile when doing "make install" with

parameter "$(modulesdir)". This is fine when the install is done on a

live system. But when "make install" was called with a "$DESTDIR" then

this won't work, as the correct path would then be

"$(DESTDIR)$(modulesdir)". So add "$(DESTDIR)" in front.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-10056: Fix modcheck.sh invokation

modcheck.sh gets called by build/Makefile when doing "make install" with

parameter "$(modulesdir)". This is fine when the install is done on a

live system. But when "make install" was called with a "$DESTDIR" then

this won't work, as the correct path would then be

"$(DESTDIR)$(modulesdir)". So add "$(DESTDIR)" in front.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-10055: Fix gentls_cert script to use "@certsdir@"

Currently gentls_cert uses "@prefix@/conf/ssl". But FreeSWITCH's

configure script provides "@certsdir@", so let's use that instead.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-10055: Fix gentls_cert script to use "@certsdir@"

Currently gentls_cert uses "@prefix@/conf/ssl". But FreeSWITCH's

configure script provides "@certsdir@", so let's use that instead.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9858: add configure switches to disable libpng and freetype support

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9858: add configure switches to disable libpng and freetype support

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

Conflicts:

configure.ac

FS-9840 mod_avmd: Fix implicit declaration warning

Fix the following compile-time warning:

making all mod_avmd

make[7]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/applications/mod_avmd'

CC mod_avmd_la-mod_avmd.lo

mod_avmd.c: In function 'avmd_process_sample':

mod_avmd.c:49:19: error: implicit declaration of function '__isinf' [-Werror=implicit-function-declaration]

#define ISINF(x) (__isinf(x))

^

mod_avmd.c:2038:33: note: in expansion of macro 'ISINF'

if (ISNAN(amplitude) || ISINF(amplitude)) {

^

cc1: all warnings being treated as errors

Makefile:682: recipe for target 'mod_avmd_la-mod_avmd.lo' failed

Fix this by adding the declaration for __isinf(), the same is done for

__isnan() already

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

    • -0
    • +1
    /src/mod/applications/mod_avmd/mod_avmd.c
FS-9840 mod_avmd: Fix implicit declaration warning

Fix the following compile-time warning:

making all mod_avmd

make[7]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/applications/mod_avmd'

CC mod_avmd_la-mod_avmd.lo

mod_avmd.c: In function 'avmd_process_sample':

mod_avmd.c:49:19: error: implicit declaration of function '__isinf' [-Werror=implicit-function-declaration]

#define ISINF(x) (__isinf(x))

^

mod_avmd.c:2038:33: note: in expansion of macro 'ISINF'

if (ISNAN(amplitude) || ISINF(amplitude)) {

^

cc1: all warnings being treated as errors

Makefile:682: recipe for target 'mod_avmd_la-mod_avmd.lo' failed

Fix this by adding the declaration for __isinf(), the same is done for

__isnan() already

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

    • -0
    • +1
    /src/mod/applications/mod_avmd/mod_avmd.c
FS-9840 sofia-sip: fix implicit declaration warning

This fixes the following compile-time warning:

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE tport_type_connect.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE tport_type_ws.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE ws.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

ws.c: In function 'hton64':

ws.c:730:14: error: implicit declaration of function '__bswap_64' [-Werror=implicit-function-declaration]

else return __bswap_64(val);

^

cc1: all warnings being treated as errors

Makefile:1465: recipe for target 'ws.lo' failed

make[12]: *** [ws.lo] Error 1

Fix by including byteswap.h, which is available on Linux and also

everywhere glibc is used (wpa_supplicant includes this header the same

way).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9840 sofia-sip: fix implicit declaration warning

This fixes the following compile-time warning:

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE tport_type_connect.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE tport_type_ws.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

LTCOMPILE ws.lo

cc1: note: someone does not honour COPTS correctly, passed 2 times

ws.c: In function 'hton64':

ws.c:730:14: error: implicit declaration of function '__bswap_64' [-Werror=implicit-function-declaration]

else return __bswap_64(val);

^

cc1: all warnings being treated as errors

Makefile:1465: recipe for target 'ws.lo' failed

make[12]: *** [ws.lo] Error 1

Fix by including byteswap.h, which is available on Linux and also

everywhere glibc is used (wpa_supplicant includes this header the same

way).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9840 mod-verto: fix implicit declaration warning

This fixes the following compile-time warning:

making all mod_verto

make[7]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/endpoints/mod_verto'

CC mod_verto_la-mod_verto.lo

CC mod_verto_la-ws.lo

ws.c: In function 'hton64':

ws.c:730:14: error: implicit declaration of function '__bswap_64' [-Werror=implicit-function-declaration]

else return __bswap_64(val);

^

cc1: all warnings being treated as errors

Fix by including byteswap.h, which is available on Linux and also

everywhere glibc is used (wpa_supplicant includes this header the same

way).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9840 mod-verto: fix implicit declaration warning

This fixes the following compile-time warning:

making all mod_verto

make[7]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/endpoints/mod_verto'

CC mod_verto_la-mod_verto.lo

CC mod_verto_la-ws.lo

ws.c: In function 'hton64':

ws.c:730:14: error: implicit declaration of function '__bswap_64' [-Werror=implicit-function-declaration]

else return __bswap_64(val);

^

cc1: all warnings being treated as errors

Fix by including byteswap.h, which is available on Linux and also

everywhere glibc is used (wpa_supplicant includes this header the same

way).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9840 mod_sofia: fix redefine warning

This fixes the following compile-time warning:

make[8]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/endpoints/mod_sofia'

CC mod_sofia_la-mod_sofia.lo

CC mod_sofia_la-sofia.lo

CC mod_sofia_la-sofia_glue.lo

CC mod_sofia_la-sofia_presence.lo

CC mod_sofia_la-sofia_reg.lo

CC mod_sofia_la-sofia_media.lo

CC mod_sofia_la-sip-dig.lo

In file included from sip-dig.c:137:0:

/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/libs/sofia-sip/libsofia-sip-ua/bnf/../../config.h:522:0: error: "__BYTE_ORDER" redefined [-Werror]

#define __BYTE_ORDER __BIG_ENDIAN

^

In file included from /home/sk/tmp/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.15/include/sys/types.h:70:0,

from ../../../../src/include/switch.h:107,

from sip-dig.c:135:

/home/sk/tmp/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.15/include/endian.h:11:0: note: this is the location of the previous definition

#define __BYTE_ORDER __BYTE_ORDER__

^

cc1: all warnings being treated as errors

SWITCH_BYTE_ORDER is already used elsewhere in FS source and takes care

of changing byte order without causing a warning

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9840 mod_sofia: fix redefine warning

This fixes the following compile-time warning:

make[8]: Entering directory '/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/src/mod/endpoints/mod_sofia'

CC mod_sofia_la-mod_sofia.lo

CC mod_sofia_la-sofia.lo

CC mod_sofia_la-sofia_glue.lo

CC mod_sofia_la-sofia_presence.lo

CC mod_sofia_la-sofia_reg.lo

CC mod_sofia_la-sofia_media.lo

CC mod_sofia_la-sip-dig.lo

In file included from sip-dig.c:137:0:

/home/sk/tmp/lede/build_dir/target-mips_24kc_musl-1.1.15/freeswitch-1.8.0/libs/sofia-sip/libsofia-sip-ua/bnf/../../config.h:522:0: error: "__BYTE_ORDER" redefined [-Werror]

#define __BYTE_ORDER __BIG_ENDIAN

^

In file included from /home/sk/tmp/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.15/include/sys/types.h:70:0,

from ../../../../src/include/switch.h:107,

from sip-dig.c:135:

/home/sk/tmp/lede/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.15/include/endian.h:11:0: note: this is the location of the previous definition

#define __BYTE_ORDER __BYTE_ORDER__

^

cc1: all warnings being treated as errors

SWITCH_BYTE_ORDER is already used elsewhere in FS source and takes care

of changing byte order without causing a warning

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9824 [tone2wav.c] Fix segfault on tone2wav

I checked fs_encode and saw that it terminates itself a bit differently, so I applied the same to tone2wav and the segfaults went away

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>

FS-9824 [tone2wav.c] Fix segfault on tone2wav

I checked fs_encode and saw that it terminates itself a bit differently, so I applied the same to tone2wav and the segfaults went away

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>