]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9840 sofia-sip: fix implicit declaration warning
authorSebastian Kemper <sebastian_ml@gmx.net>
Tue, 13 Dec 2016 19:33:02 +0000 (20:33 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Fri, 23 Dec 2016 20:44:27 +0000 (21:44 +0100)
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>
libs/sofia-sip/libsofia-sip-ua/tport/ws.c

index 4040c0f6ab011578a186b20e1a2075df576127d3..b93be26964607812c7d5d4a919186408c7f7ef12 100644 (file)
@@ -6,6 +6,10 @@
 #include <fcntl.h>
 #endif
 
+#if defined(__linux__) || defined(__GLIBC__)
+#include <byteswap.h>
+#endif
+
 #ifndef _MSC_VER
 #define ms_sleep(x)    usleep( x * 1000);
 #else