diff options
author | Brad Smith <brad@comstyle.com> | 2024-05-18 07:38:40 -0400 |
---|---|---|
committer | Brad Smith <brad@comstyle.com> | 2024-05-18 07:38:40 -0400 |
commit | 115c96b9bd53e775f425f23d5b73fa0a9dedbd08 (patch) | |
tree | c6684e5a7b5cf8884c62e5dff8d7063e4a48d260 /libavutil | |
parent | be3404bbacae5a046e1b3e66a98810b4b7564249 (diff) | |
download | ffmpeg-115c96b9bd53e775f425f23d5b73fa0a9dedbd08.tar.gz |
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.
Signed-off-by: Brad Smith <brad@comstyle.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/ppc/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/ppc/cpu.c b/libavutil/ppc/cpu.c index bc8bb5f47c..2b13cda662 100644 --- a/libavutil/ppc/cpu.c +++ b/libavutil/ppc/cpu.c @@ -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}; |