--- third_party/unrar/src/os.hpp.orig	2026-04-28 21:06:17 UTC
+++ third_party/unrar/src/os.hpp
@@ -172,9 +172,12 @@
 
 #if defined(__aarch64__) && (defined(__ARM_FEATURE_CRYPTO) || defined(__ARM_FEATURE_CRC32))
 #include <arm_neon.h>
-#ifndef _APPLE
+#if !defined(_APPLE) && !defined(__FreeBSD__)
 #include <sys/auxv.h>
 #include <asm/hwcap.h>
+#endif
+#ifdef __FreeBSD__
+#include <machine/armreg.h>
 #endif
 #ifdef __ARM_FEATURE_CRYPTO
 #define USE_NEON_AES
