diff --git a/app/streaming/streamutils.cpp b/app/streaming/streamutils.cpp index 9bd32f50..e768e348 100644 --- a/app/streaming/streamutils.cpp +++ b/app/streaming/streamutils.cpp @@ -222,12 +222,14 @@ bool StreamUtils::hasFastAes() // Everything that runs Catalina and later has AES-NI or ARMv8 crypto instructions return true; #elif (defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)) && defined(Q_PROCESSOR_ARM) && QT_POINTER_SIZE == 4 - unsigned long hwcap2 = 0; - elf_aux_info(AT_HWCAP2, &hwcap2, sizeof(hwcap2)); + unsigned long hwcap2; + if (elf_aux_info(AT_HWCAP2, &hwcap2, sizeof(hwcap2)) != 0) + hwcap2 = 0; return (hwcap2 & HWCAP2_AES); #elif (defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)) && defined(Q_PROCESSOR_ARM) && QT_POINTER_SIZE == 8 - unsigned long hwcap = 0; - elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); + unsigned long hwcap; + if (elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)) != 0) + hwcap = 0; return (hwcap & HWCAP_AES); #elif defined(Q_OS_LINUX) && defined(Q_PROCESSOR_ARM) && QT_POINTER_SIZE == 4 return getauxval(AT_HWCAP2) & HWCAP2_AES;