opnsense-ports/devel/electron22/files/patch-base_system_sys__info__posix.cc
Franco Fichtner d016c42591 */*: sync with upstream
Taken from: FreeBSD
2023-01-30 10:59:54 +01:00

33 lines
979 B
C++

--- base/system/sys_info_posix.cc.orig 2022-11-30 08:12:58 UTC
+++ base/system/sys_info_posix.cc
@@ -182,12 +182,12 @@ absl::optional<int> NumberOfPhysicalProcessors() {
} // namespace internal
-#if !BUILDFLAG(IS_OPENBSD)
+#if !BUILDFLAG(IS_BSD)
int SysInfo::NumberOfProcessors() {
static int number_of_processors = internal::NumberOfProcessors();
return number_of_processors;
}
-#endif // !BUILDFLAG(IS_OPENBSD)
+#endif // !BUILDFLAG(IS_BSD)
// static
uint64_t SysInfo::AmountOfVirtualMemory() {
@@ -277,6 +277,8 @@ std::string SysInfo::OperatingSystemArchitecture() {
arch = "x86";
} else if (arch == "amd64") {
arch = "x86_64";
+ } else if (arch == "arm64") {
+ arch = "aarch64";
} else if (std::string(info.sysname) == "AIX") {
arch = "ppc64";
}
@@ -300,4 +302,4 @@ void SysInfo::SetIsCpuSecurityMitigationsEnabled(bool
#endif // BUILDFLAG(IS_MAC)
-} // namespace base
\ No newline at end of file
+} // namespace base