File: s0121.patch

package info (click to toggle)
firefox 147.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,484 kB
  • sloc: cpp: 7,607,246; javascript: 6,533,185; ansic: 3,775,227; python: 1,415,393; xml: 634,561; asm: 438,951; java: 186,241; sh: 62,752; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (41 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Michael Froman <mfroman@mozilla.com>
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 <unistd.h>
 #elif defined(WEBRTC_FUCHSIA)
 #include <zircon/syscalls.h>
-#elif defined(WEBRTC_LINUX)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
 #include <unistd.h>
 #endif  // WEBRTC_LINUX
 
 #if defined(WEBRTC_ARCH_X86_FAMILY) && defined(_MSC_VER)
 #include <intrin.h>
 #endif
-#if defined(WEBRTC_ARCH_ARM_FAMILY) && defined(WEBRTC_LINUX)
+#if defined(WEBRTC_ARCH_ARM_FAMILY) && (defined(WEBRTC_LINUX) || defined(WEBRTC_BSD))
 #include <asm/hwcap.h>
 #include <sys/auxv.h>
 #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);