diff --git a/libavutil/riscv/cpu.c b/libavutil/riscv/cpu.c index 4ec6d6c826..163e4fc14a 100644 --- a/libavutil/riscv/cpu.c +++ b/libavutil/riscv/cpu.c @@ -25,7 +25,7 @@ #include "libavutil/log.h" #include "config.h" -#if HAVE_GETAUXVAL +#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO #include #define HWCAP_RV(letter) (1ul << ((letter) - 'A')) #endif @@ -84,7 +84,7 @@ int ff_get_cpu_flags_riscv(void) default: } } -#elif HAVE_GETAUXVAL +#elif HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO { const unsigned long hwcap = ff_getauxval(AT_HWCAP);