diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2019-03-23 09:53:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-23 09:53:05 +0100 |
commit | e2cd89e3545a58d188e6b7c27256b1668b775d22 (patch) | |
tree | e7f2c8839ef66da7e48ddc7186ba9bafe487ba22 | |
parent | e5f6f68cd666ab2dc3bdc4334be052368957e06f (diff) | |
parent | b1282da5424cfc7fbe331ac5256148780a5fa2fb (diff) |
Merge pull request #678 from madpilot78/FreeBSD_endian.h
The le32toh() function used in some places on BSD OSes requires sys/en…
-rw-r--r-- | src/lib/ndpi_main.c | 4 | ||||
-rw-r--r-- | src/lib/protocols/quic.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index ae56fa5cc..047167ac3 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -41,6 +41,10 @@ #include <unistd.h> #endif +#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ +#include <sys/endian.h> +#endif + #include "ndpi_content_match.c.inc" #include "third_party/include/ndpi_patricia.h" #include "third_party/include/ht_hash.h" diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c index 322eb9be7..d14538e0d 100644 --- a/src/lib/protocols/quic.c +++ b/src/lib/protocols/quic.c @@ -22,6 +22,10 @@ * */ +#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ +#include <sys/endian.h> +#endif + #include "ndpi_protocol_ids.h" #define NDPI_CURRENT_PROTO NDPI_PROTOCOL_QUIC |