From: Sebastian Kemper Date: Tue, 13 Dec 2016 19:32:10 +0000 (+0100) Subject: FS-9840 mod-verto: fix implicit declaration warning X-Git-Tag: v1.8.0~966^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8063ad658b7c38e69a3e55b79c257161697aca8e;p=thirdparty%2Ffreeswitch.git 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 --- diff --git a/src/mod/endpoints/mod_verto/ws.c b/src/mod/endpoints/mod_verto/ws.c index 4040c0f6ab..b93be26964 100644 --- a/src/mod/endpoints/mod_verto/ws.c +++ b/src/mod/endpoints/mod_verto/ws.c @@ -6,6 +6,10 @@ #include #endif +#if defined(__linux__) || defined(__GLIBC__) +#include +#endif + #ifndef _MSC_VER #define ms_sleep(x) usleep( x * 1000); #else