vti: add vti specific settings as nested json object
[openwrt/openwrt.git] / package / utils / otrx / src / otrx.c
index 11db426a1df7036c14705f8b931dc9999eda401a..101a31004dcd4e69606ccba61b8caa2c8fbad168 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <byteswap.h>
+#include <endian.h>
 #include <errno.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 
+#if !defined(__BYTE_ORDER)
+#error "Unknown byte order"
+#endif
+
 #if __BYTE_ORDER == __BIG_ENDIAN
 #define cpu_to_le32(x) bswap_32(x)
 #define le32_to_cpu(x) bswap_32(x)