Index: os.hpp
--- os.hpp.orig
+++ os.hpp
@@ -117,6 +117,7 @@
 
 #ifdef _UNIX
 
+#include <endian.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -127,6 +128,11 @@
 #ifdef _APPLE
   #include <sys/sysctl.h>
 #endif
+#if defined(__OpenBSD__) && defined(__aarch64__)
+  #include <sys/sysctl.h>
+  #include <machine/cpu.h>
+  #include <machine/armreg.h>
+#endif
 #ifndef SFX_MODULE
     #include <sys/statvfs.h>
 #endif
@@ -158,7 +164,7 @@
 
 #if defined(__aarch64__) && (defined(__ARM_FEATURE_CRYPTO) || defined(__ARM_FEATURE_CRC32))
 #include <arm_neon.h>
-#ifndef _APPLE
+#if !defined(_APPLE) && !defined(__OpenBSD__)
 #include <sys/auxv.h>
 #include <asm/hwcap.h>
 #endif
@@ -263,7 +269,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
