summaryrefslogtreecommitdiff
path: root/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2019-03-18 17:53:39 +0000
committerSteve Wills <swills@FreeBSD.org>2019-03-18 17:53:39 +0000
commit63bab8f70465940b841c3a24aeed2db14ad5fb3a (patch)
tree846e0cab2d6d95a550c27ac3a743fcbe6963f298 /games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
parentsysutils/fusefs-s3fs: Update to 1.85 (diff)
games/multimc: update to 0.6.5
PR: 236488 Submitted by: tsundoku <me@tsundoku.ne.jp> (maintainer)
Diffstat (limited to 'games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp')
-rw-r--r--games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp33
1 files changed, 11 insertions, 22 deletions
diff --git a/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
index 81f6d8107d58..d3d6d0bc58f8 100644
--- a/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
+++ b/games/multimc/files/patch-libraries_systeminfo_src_sys__unix.cpp
@@ -1,17 +1,17 @@
---- libraries/systeminfo/src/sys_unix.cpp.orig 2017-12-18 00:19:43 UTC
+--- libraries/systeminfo/src/sys_unix.cpp.orig 2019-03-09 17:25:33 UTC
+++ libraries/systeminfo/src/sys_unix.cpp
-@@ -16,6 +16,7 @@ Sys::KernelInfo Sys::getKernelInfo()
+@@ -18,6 +18,7 @@ Sys::KernelInfo Sys::getKernelInfo()
uint64_t Sys::getSystemRam()
{
- std::string token;
+ std::string token;
+ #ifdef Q_OS_LINUX
- std::ifstream file("/proc/meminfo");
- while(file >> token)
- {
-@@ -34,6 +35,19 @@ uint64_t Sys::getSystemRam()
- // ignore rest of the line
- file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
- }
+ std::ifstream file("/proc/meminfo");
+ while(file >> token)
+ {
+@@ -36,6 +37,19 @@ uint64_t Sys::getSystemRam()
+ // ignore rest of the line
+ file.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
+ }
+ #elif defined Q_OS_FREEBSD
+ char buff[512];
+ FILE *fp = popen("sysctl hw.physmem", "r");
@@ -25,17 +25,6 @@
+ }
+ }
+ #endif
- return 0; // nothing found
+ return 0; // nothing found
}
-@@ -43,7 +57,9 @@ bool Sys::isCPU64bit()
- }
-
- bool Sys::isSystem64bit()
--{
-+{
-+ #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- // kernel build arch on linux
- return QSysInfo::currentCpuArchitecture() == "x86_64";
-+ #endif
- }