diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 581925a4..b315e0f3 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -7,6 +7,7 @@ extern "C" {
 
 #include <stddef.h>
 #include <stdint.h>
+#include <endian.h>
 
 #define __NAMESER	19991006
 #define NS_PACKETSZ	512