--- a/third/blackwidow/src/coding.h
+++ b/third/blackwidow/src/coding.h
@@ -11,6 +11,7 @@
 #define BLACKWIDOW_PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
 #endif
 #include <string.h>
+#include <sys/endian.h>
 
 namespace blackwidow {
   static const bool kLittleEndian = BLACKWIDOW_PLATFORM_IS_LITTLE_ENDIAN;