From 8063ad658b7c38e69a3e55b79c257161697aca8e Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Tue, 13 Dec 2016 20:32:10 +0100 Subject: [PATCH] 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 --- src/mod/endpoints/mod_verto/ws.c | 4 ++++ 1 file changed, 4 insertions(+) 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