diff --git a/examples/convert.c b/examples/convert.c
index 2c8f107..0b4335c 100644
--- a/examples/convert.c
+++ b/examples/convert.c
@@ -5,6 +5,7 @@
 #include <inttypes.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <sys/endian.h>
 
 #include <hexagram/capture.h>
 #include <hexagram/pcapng.h>
diff --git a/examples/pcapread.c b/examples/pcapread.c
index 8ecd26e..90a1e8b 100644
--- a/examples/pcapread.c
+++ b/examples/pcapread.c
@@ -6,6 +6,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <sys/endian.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>