From 3b287770b984cce7c87211c04b86d0c2cfd2b1bf Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 6 Jan 2024 19:35:25 -0500 Subject: [PATCH] Corrections for FreeBSD ARM support FreeBSD does not have the /proc file system. FreeBSD was added to the code path for aarch64 before the use of the /proc file system with f7b4b750d8930b5bb6696cea6d609dc70a0597db but then /proc usage was added not long after with b3269b08a19d1da49cf63754d92bdbd39e22c568 --- modules/core/src/system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 4cba6eb2d2..c61fd67a19 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -562,7 +562,7 @@ struct HWFeatures } #endif // CV_CPUID_X86 - #if defined __ANDROID__ || defined __linux__ || defined __FreeBSD__ || defined __QNX__ + #if defined __ANDROID__ || defined __linux__ || defined __QNX__ #ifdef __aarch64__ have[CV_CPU_NEON] = true; have[CV_CPU_FP16] = true; @@ -611,7 +611,7 @@ struct HWFeatures CV_LOG_INFO(NULL, "- FP16 instructions is NOT enabled via build flags"); #endif #endif - #elif defined __arm__ && !defined __FreeBSD__ + #elif defined __arm__ int cpufile = open("/proc/self/auxv", O_RDONLY); if (cpufile >= 0)