SHA256
1
0
forked from pool/kinfocenter5
kinfocenter5/Correctly-show-mem-size-over-4GiB-on-32bit.patch
Fabian Vogt a956c5d5bd Accepting request 699563 from home:wolfi323:test
- Add Correctly-show-mem-size-over-4GiB-on-32bit.patch to fix wrong
  display of RAM size on a 32bit system if there is more than 4 GiB
  (boo#1131826, kde#406351)

OBS-URL: https://build.opensuse.org/request/show/699563
OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kinfocenter5?expand=0&rev=230
2019-04-30 08:57:19 +00:00

30 lines
965 B
Diff

From 10d60170eaa46c3e4233c4eef966418d0065754d Mon Sep 17 00:00:00 2001
From: Christoph Feck <cfeck@kde.org>
Date: Tue, 30 Apr 2019 00:55:12 +0200
Subject: Correctly show memory sizes > 4 GiB on 32 bit Linux
BUG: 406351
FIXED-IN: 5.16.0
Differential Revision: https://phabricator.kde.org/D20828
---
Modules/about-distro/src/Module.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/about-distro/src/Module.cpp b/Modules/about-distro/src/Module.cpp
index 56358cd..b4bc67e 100644
--- a/Modules/about-distro/src/Module.cpp
+++ b/Modules/about-distro/src/Module.cpp
@@ -56,7 +56,7 @@ static qlonglong calculateTotalRam()
struct sysinfo info;
if (sysinfo(&info) == 0)
// manpage "sizes are given as multiples of mem_unit bytes"
- ret = info.totalram * info.mem_unit;
+ ret = qlonglong(info.totalram) * info.mem_unit;
#elif defined(Q_OS_FREEBSD)
/* Stuff for sysctl */
size_t len;
--
cgit v1.1