From: Michael Froman Date: Thu, 11 Sep 2025 14:17:00 -0500 Subject: Bug 1988042 - add BSD support to new version of libwebrtc's cpu_info.cc r?ng! Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/e3b37acb8816aefb9134a68cafad8c7d5e145179 --- rtc_base/cpu_info.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rtc_base/cpu_info.cc b/rtc_base/cpu_info.cc index 0ce48a02f1..f0bff56911 100644 --- a/rtc_base/cpu_info.cc +++ b/rtc_base/cpu_info.cc @@ -29,14 +29,14 @@ #include #elif defined(WEBRTC_FUCHSIA) #include -#elif defined(WEBRTC_LINUX) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) #include #endif // WEBRTC_LINUX #if defined(WEBRTC_ARCH_X86_FAMILY) && defined(_MSC_VER) #include #endif -#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(WEBRTC_LINUX) +#if defined(WEBRTC_ARCH_ARM_FAMILY) && (defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)) #include #include #endif @@ -176,6 +176,9 @@ bool Supports(ISA instruction_set_architecture) { if (instruction_set_architecture == ISA::kNeon) { #if defined(WEBRTC_ANDROID) return 0 != (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON); +#elif defined(WEBRTC_BSD) + // OpenBSD does not have getauxval() and does not have /proc reading + return false; #elif defined(WEBRTC_LINUX) uint64_t hwcap = 0; hwcap = getauxval(AT_HWCAP);