ports/devel/electron4/files/patch-base_sys__info__posix.cc
Luca Pizzamiglio 2f40d531c4 devel/electron4: Add electron 4.2.2
Finally, after a long wait, an electron port for FreeBSD lands in the
portstree.

A huge thanks to everyone contributed to this huge effort and to the
maintainer that is willing to take the burden of the maintainership!
2019-05-28 09:12:02 +00:00

38 lines
1.3 KiB
C++

--- base/sys_info_posix.cc.orig 2019-03-15 06:36:56 UTC
+++ base/sys_info_posix.cc
@@ -38,7 +38,7 @@
namespace {
-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA)
+#if !defined(OS_BSD) && !defined(OS_FUCHSIA)
int NumberOfProcessors() {
// sysconf returns the number of "logical" (not "physical") processors on both
// Mac and Linux. So we get the number of max available "logical" processors.
@@ -65,7 +65,7 @@ int NumberOfProcessors() {
base::LazyInstance<
base::internal::LazySysInfoValue<int, NumberOfProcessors> >::Leaky
g_lazy_number_of_processors = LAZY_INSTANCE_INITIALIZER;
-#endif // !defined(OS_OPENBSD) && !defined(OS_FUCHSIA)
+#endif // !defined(OS_BSD) && !defined(OS_FUCHSIA)
#if !defined(OS_FUCHSIA)
int64_t AmountOfVirtualMemory() {
@@ -133,7 +133,7 @@ bool GetDiskSpaceInfo(const base::FilePath& path,
namespace base {
-#if !defined(OS_OPENBSD) && !defined(OS_FUCHSIA)
+#if !defined(OS_BSD) && !defined(OS_FUCHSIA)
int SysInfo::NumberOfProcessors() {
return g_lazy_number_of_processors.Get().value();
}
@@ -226,6 +226,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";
}