aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-03-30 07:56:27 +0800
committermiwi <miwi@FreeBSD.org>2008-03-30 07:56:27 +0800
commit4fdc6b378490cbda5b5ea545b9d07cab37c549d3 (patch)
tree906fbee7b3134570f38d0670f4b19a0478de3a90 /sysutils
parentd9bfff58533a3d18570ee7e943b76434dbd0d4b7 (diff)
downloadfreebsd-ports-gnome-4fdc6b378490cbda5b5ea545b9d07cab37c549d3.tar.gz
freebsd-ports-gnome-4fdc6b378490cbda5b5ea545b9d07cab37c549d3.tar.zst
freebsd-ports-gnome-4fdc6b378490cbda5b5ea545b9d07cab37c549d3.zip
- Fix memory bug when you have more than 3 GB
PR: 121316 Submitted by: MQ <antinvidia@gmail.com> Approved by: maintainer timeout
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xfce4-systemload-plugin/Makefile3
-rw-r--r--sysutils/xfce4-systemload-plugin/files/patch-panel-plugin-memswap.c24
2 files changed, 25 insertions, 2 deletions
diff --git a/sysutils/xfce4-systemload-plugin/Makefile b/sysutils/xfce4-systemload-plugin/Makefile
index bcf125020391..637b7d68ef22 100644
--- a/sysutils/xfce4-systemload-plugin/Makefile
+++ b/sysutils/xfce4-systemload-plugin/Makefile
@@ -7,7 +7,7 @@
PORTNAME= xfce4-systemload-plugin
PORTVERSION= 0.4.2
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils xfce
MASTER_SITES= http://goodies.xfce.org/releases/${PORTNAME}/
DIST_SUBDIR= xfce4
@@ -21,6 +21,5 @@ USE_GETTEXT= yes
USE_GMAKE= yes
USE_GNOME= gnometarget gtk20 intltool intlhack pkgconfig
USE_XFCE= configenv panel
-USE_XLIB= yes
.include <bsd.port.mk>
diff --git a/sysutils/xfce4-systemload-plugin/files/patch-panel-plugin-memswap.c b/sysutils/xfce4-systemload-plugin/files/patch-panel-plugin-memswap.c
new file mode 100644
index 000000000000..d682fb5ee019
--- /dev/null
+++ b/sysutils/xfce4-systemload-plugin/files/patch-panel-plugin-memswap.c
@@ -0,0 +1,24 @@
+--- panel-plugin/memswap.c.orig 2007-01-18 02:01:09.000000000 +0800
++++ panel-plugin/memswap.c 2008-03-03 21:01:50.000000000 +0800
+@@ -203,7 +203,7 @@
+ gint read_memswap(gulong *mem, gulong *swap, gulong *MT, gulong *MU, gulong *ST, gulong *SU)
+ {
+ int total_pages;
+- int free_pages;
++ u_int free_pages;
+ int inactive_pages;
+ int pagesize = getpagesize();
+ int swap_avail;
+@@ -222,8 +222,8 @@
+ return -1;
+ }
+
+- *MT = (total_pages*pagesize) >> 10;
+- *MU = ((total_pages-free_pages-inactive_pages) * pagesize) >> 10;
++ *MT = CONVERT(total_pages);
++ *MU = CONVERT(total_pages-free_pages-inactive_pages);
+ *mem = *MU * 100 / *MT;
+
+ if((*swap = swapmode(&swap_avail, &swap_free)) >= 0) {
+
+