aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/ndpi_define.h.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in
index e63a137b9..3c4a0ee6c 100644
--- a/src/include/ndpi_define.h.in
+++ b/src/include/ndpi_define.h.in
@@ -350,8 +350,16 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
#if defined(WIN32)
#undef strtok_r
#define strtok_r strtok_s
+
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define le16toh(x) (x)
+#define le32toh(x) (x)
+#else
+#error "byte order not supported"
#endif
+#endif /* WIN32 */
+
#define NDPI_MAX_DNS_REQUESTS 16
#define NDPI_MIN_NUM_STUN_DETECTION 8