Message ID | 20211115122343.2421-1-brilliantov@inbox.ru |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] libavutil/mips: fix build if sys/auxv.h not present | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/configure b/configure index 98113c95fd..18c93f2619 100755 --- a/configure +++ b/configure @@ -2148,6 +2148,7 @@ HEADERS_LIST=" valgrind_valgrind_h windows_h winsock2_h + sys_auxv_h " INTRINSICS_LIST=" diff --git a/libavutil/mips/cpu.c b/libavutil/mips/cpu.c index 59619d54de..854eabfc18 100644 --- a/libavutil/mips/cpu.c +++ b/libavutil/mips/cpu.c @@ -23,7 +23,9 @@ #include <stdint.h> #include <stdio.h> #include <string.h> +#if HAVE_SYS_AUXV_H #include <sys/auxv.h> +#endif #include "asmdefs.h" #include "libavutil/avstring.h" #endif @@ -34,7 +36,11 @@ static int cpucfg_available(void) { +#if HAVE_SYS_AUXV_H return getauxval(AT_HWCAP) & HWCAP_LOONGSON_CPUCFG; +#else + return 0; +#endif } /* Most toolchains have no CPUCFG support yet */