avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD

Use the machdep.altivec sysctl on NetBSD for AltiVec detection
as is done with OpenBSD.

(cherry picked from commit 115c96b9bd)
Signed-off-by: Brad Smith <brad@comstyle.com>
This commit is contained in:
Brad Smith 2024-05-18 07:38:40 -04:00
parent 3eb8705ab7
commit 6d9e2e94c3
1 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#elif defined(__OpenBSD__)
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
@ -56,8 +56,8 @@ int ff_get_cpu_flags_ppc(void)
if (result == VECTORTYPE_ALTIVEC)
return AV_CPU_FLAG_ALTIVEC;
return 0;
#elif defined(__APPLE__) || defined(__OpenBSD__)
#ifdef __OpenBSD__
#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__NetBSD__) || defined(__OpenBSD__)
int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
#else
int sels[2] = {CTL_HW, HW_VECTORUNIT};