$OpenBSD: patch-vpx_ports_arm_cpudetect_c,v 1.2 2019/09/15 16:03:31 ajacoutot Exp $

Allow ARM CPU runtime detection code to build on OpenBSD.

Index: vpx_ports/arm_cpudetect.c
--- vpx_ports/arm_cpudetect.c.orig
+++ vpx_ports/arm_cpudetect.c
@@ -147,7 +147,20 @@ int arm_cpu_caps(void) {
   }
   return flags & mask;
 }
-#else  /* end __linux__ */
+#elif defined(__OpenBSD__) /* end __linux__ */
+int arm_cpu_caps(void) {
+  int flags;
+  int mask;
+  if (!arm_cpu_env_flags(&flags)) {
+    return flags;
+  }
+  mask = arm_cpu_env_mask();
+#if HAVE_NEON || HAVE_NEON_ASM
+  flags |= HAS_NEON;
+#endif /* HAVE_NEON  || HAVE_NEON_ASM */
+  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."
