$OpenBSD: patch-aom_ports_arm_cpudetect_c,v 1.2 2019/09/22 09:20:46 ajacoutot Exp $

Allow ARM CPU runtime detection code to build on OpenBSD.

Index: aom_ports/arm_cpudetect.c
--- aom_ports/arm_cpudetect.c.orig
+++ aom_ports/arm_cpudetect.c
@@ -143,7 +143,21 @@ int aom_arm_cpu_caps(void) {
   }
   return flags & mask;
 }
-#else  /* end __linux__ */
+#elif defined(__OpenBSD__) /* end __linux__ */
+int aom_arm_cpu_caps(void) {
+  int flags;
+  int mask;
+  if (!arm_cpu_env_flags(&flags)) {
+    return flags;
+  }
+  mask = arm_cpu_env_mask();
+#if HAVE_NEON
+  flags |= HAS_NEON;
+#endif /* HAVE_NEON */
+  return flags & mask;
+}
+
+#else  /* end __OpenBSD__ */
 #error \
     "--enable-runtime-cpu-detect selected, but no CPU detection method " \
 "available for your platform. Reconfigure with --disable-runtime-cpu-detect."
