$OpenBSD: patch-vpx_ports_ppc_cpudetect_c,v 1.1 2018/10/17 08:22:29 ajacoutot Exp $

Allow PowerPC CPU runtime detection code to build on OpenBSD.

Index: vpx_ports/ppc_cpudetect.c
--- vpx_ports/ppc_cpudetect.c.orig
+++ vpx_ports/ppc_cpudetect.c
@@ -8,16 +8,19 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#if defined(__linux__)
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdint.h>
 #include <asm/cputable.h>
 #include <linux/auxvec.h>
+#endif
 
 #include "./vpx_config.h"
 #include "vpx_ports/ppc.h"
 
 #if CONFIG_RUNTIME_CPU_DETECT
+#if defined(__linux__)
 static int cpu_env_flags(int *flags) {
   char *env;
   env = getenv("VPX_SIMD_CAPS");
@@ -77,4 +80,5 @@ out_close:
 // If there is no RTCD the function pointers are not used and can not be
 // changed.
 int ppc_simd_caps(void) { return 0; }
+#endif
 #endif  // CONFIG_RUNTIME_CPU_DETECT
