diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-12-04 00:51:58 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-12-04 00:51:58 +0000 |
commit | bf228555fcae8e2b4ac64f23e0329d1bbf5cb947 (patch) | |
tree | 3cafe0e66644a9c53f27894d6dafc583a3f110d0 /multimedia/libvpx | |
parent | ad553100972c0fcf970b635904147fee86123845 (diff) | |
download | ports-bf228555fcae8e2b4ac64f23e0329d1bbf5cb947.tar.gz ports-bf228555fcae8e2b4ac64f23e0329d1bbf5cb947.zip |
multimedia/libvpx: standardize variable name holding AT_HWCAP value
Notes
Notes:
svn path=/head/; revision=486566
Diffstat (limited to 'multimedia/libvpx')
-rw-r--r-- | multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c | 8 | ||||
-rw-r--r-- | multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c b/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c index 2a0a57301678..dea4540033ef 100644 --- a/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c +++ b/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c @@ -49,18 +49,18 @@ +int arm_cpu_caps(void) { + int flags; + int mask; -+ u_long hwcaps = 0; ++ u_long hwcap = 0; + if (!arm_cpu_env_flags(&flags)) { + return flags; + } + mask = arm_cpu_env_mask(); +#if __FreeBSD__ < 12 -+ hwcaps = getauxval(AT_HWCAP); ++ hwcap = getauxval(AT_HWCAP); +#else -+ elf_aux_info(AT_HWCAP, &hwcaps, sizeof(hwcaps)); ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); +#endif +#if HAVE_NEON || HAVE_NEON_ASM -+ if (hwcaps & HWCAP_NEON) flags |= HAS_NEON; ++ if (hwcap & HWCAP_NEON) flags |= HAS_NEON; +#endif + return flags & mask; +} diff --git a/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c b/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c index dda410b28095..766a1e1eaa56 100644 --- a/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c +++ b/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c @@ -43,7 +43,7 @@ +int ppc_simd_caps(void) { + int flags; + int mask; -+ u_long cpu_features = 0; ++ u_long hwcap = 0; + + // If VPX_SIMD_CAPS is set then allow only those capabilities. + if (!cpu_env_flags(&flags)) { @@ -53,13 +53,13 @@ + mask = cpu_env_mask(); + +#if __FreeBSD__ < 12 -+ size_t sz = sizeof(cpu_features); -+ sysctlbyname("hw.cpu_features", &cpu_features, &sz, NULL, 0); ++ size_t sz = sizeof(hwcap); ++ sysctlbyname("hw.cpu_features", &hwcap, &sz, NULL, 0); +#else -+ elf_aux_info(AT_HWCAP, &cpu_features, sizeof(cpu_features)); ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); +#endif +#if HAVE_VSX -+ if (cpu_features & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX; ++ if (hwcap & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX; +#endif + + return flags & mask; |