Instead of hardcoding the endianess of more platforms, just get the configuration from the system headers.
Signed-off-by: Uwe Kleine-König <uwe+open...@kleine-koenig.org> --- .../patches/107-improve-endianess-detection.patch | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 net/freeswitch/patches/107-improve-endianess-detection.patch diff --git a/net/freeswitch/patches/107-improve-endianess-detection.patch b/net/freeswitch/patches/107-improve-endianess-detection.patch new file mode 100644 index 0000000..fa385b3 --- /dev/null +++ b/net/freeswitch/patches/107-improve-endianess-detection.patch @@ -0,0 +1,29 @@ +This fixes: + + In file included from ../../include/zrtp.h:18:0, + from lbnmem.c:63: + ../../include/zrtp_config.h:107:6: error: #error "Libzrtp can't detect byte order: use manual setup in zrtp_config_user.h" + +on mips. + +--- freeswitch-1.3.13b.orig/libs/libzrtp/include/zrtp_config.h ++++ freeswitch-1.3.13b/libs/libzrtp/include/zrtp_config.h +@@ -66,8 +66,17 @@ + * If the byte order is not specified manually in zrtp_config_user.h - try to detect it automatically + */ + #if !defined(ZRTP_BYTE_ORDER) ++#if defined(linux) || defined(__linux) + +-#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \ ++#include <endian.h> ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN ++#elif __BYTE_ORDER == __BIG_ENDIAN ++#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN ++#endif ++ ++#elif defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \ + defined(__i386) || defined(_M_IX86) || defined(__I86__) + /* + * Generic i386 processor family, little-endian -- 1.7.10.4 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel