diff options
Diffstat (limited to 'multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c')
| -rw-r--r-- | multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c b/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c index 766a1e1eaa56..bb36e30c0e16 100644 --- a/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c +++ b/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c @@ -1,4 +1,4 @@ ---- vpx_ports/ppc_cpudetect.c.orig 2018-01-24 22:25:44 UTC +--- vpx_ports/ppc_cpudetect.c.orig 2021-03-18 19:59:46 UTC +++ vpx_ports/ppc_cpudetect.c @@ -8,12 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. @@ -27,17 +27,12 @@ int ppc_simd_caps(void) { int flags; int mask; -@@ -73,6 +74,44 @@ out_close: +@@ -73,6 +74,34 @@ out_close: close(fd); return flags & mask; } +#elif defined(__FreeBSD__) -+#if __FreeBSD__ < 12 -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#else +#include <sys/auxv.h> -+#endif +#include <machine/cpu.h> + +int ppc_simd_caps(void) { @@ -52,12 +47,7 @@ + + mask = cpu_env_mask(); + -+#if __FreeBSD__ < 12 -+ size_t sz = sizeof(hwcap); -+ sysctlbyname("hw.cpu_features", &hwcap, &sz, NULL, 0); -+#else + elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); -+#endif +#if HAVE_VSX + if (hwcap & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX; +#endif |
