Index: os.hpp
--- os.hpp.orig
+++ os.hpp
@@ -120,6 +120,7 @@
 
 #ifdef _UNIX
 
+#include <endian.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -164,8 +165,10 @@
 #include <arm_neon.h>
 #ifndef _APPLE
 #include <sys/auxv.h>
+#ifdef __linux__
 #include <asm/hwcap.h>
 #endif
+#endif
 #ifdef __ARM_FEATURE_CRYPTO
 #define USE_NEON_AES
 #endif
@@ -267,7 +270,7 @@
   #endif
 #endif
 
-#if !defined(BIG_ENDIAN) && defined(_WIN_ALL) || defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)
+#if !defined(BIG_ENDIAN) && defined(_WIN_ALL) || !defined(__STRICT_ALIGNMENT)
 // Allow unaligned integer access, increases speed in some operations.
 #define ALLOW_MISALIGNED
 #endif
