Updated xfce4-systemload-plugin to 0.3.6nb1

Fix sparc64 problems (pkg/31017)
This commit is contained in:
martti 2005-09-14 11:55:57 +00:00
parent abae487f2e
commit 4568b11d22
3 changed files with 46 additions and 2 deletions

View file

@ -1,10 +1,11 @@
# $NetBSD: Makefile,v 1.8 2005/06/23 07:25:58 martti Exp $
# $NetBSD: Makefile,v 1.9 2005/09/14 11:55:57 martti Exp $
.include "../../meta-pkgs/xfce4/Makefile.common"
XFCE4_VERSION= 0.3.6
DISTNAME= xfce4-systemload-plugin-${XFCE4_VERSION}
PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://download.berlios.de/xfce-goodies/
COMMENT= XFce4 system load plugin

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.4 2005/06/23 07:25:58 martti Exp $
$NetBSD: distinfo,v 1.5 2005/09/14 11:55:57 martti Exp $
SHA1 (xfce4-systemload-plugin-0.3.6.tar.gz) = ed477e9c8499b8e34031658237586a83bc12cef4
RMD160 (xfce4-systemload-plugin-0.3.6.tar.gz) = a7b3f28326262eeb5aa66d5cd966474ac0a4554b
Size (xfce4-systemload-plugin-0.3.6.tar.gz) = 229985 bytes
SHA1 (patch-aa) = 8424fead4e2450b55ca607f652a24e1b66c549bf

View file

@ -0,0 +1,42 @@
$NetBSD: patch-aa,v 1.1 2005/09/14 11:55:57 martti Exp $
--- panel-plugin/memswap.c.orig 2003-11-06 02:39:52.000000000 +0200
+++ panel-plugin/memswap.c 2005-09-14 11:47:37.000000000 +0300
@@ -284,7 +284,17 @@
#define ARRLEN(X) (sizeof(X)/sizeof(X[0]))
{
- static int mib[]={ CTL_HW, HW_PHYSMEM };
+ static int mib[2];
+ /* 64-bit datatype */
+ if(sizeof(size_t) == 8) {
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM64;
+ }
+ /* assume 32-bit datatype */
+ else {
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM;
+ }
len = sizeof(MTotal);
sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0);
MTotal >>= 10;
@@ -395,7 +405,17 @@
#define ARRLEN(X) (sizeof(X)/sizeof(X[0]))
{
- static int mib[]={ CTL_HW, HW_PHYSMEM };
+ static int mib[2];
+ /* 64-bit datatype */
+ if(sizeof(size_t) == 8) {
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM64;
+ }
+ /* assume 32-bit datatype */
+ else {
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM;
+ }
len = sizeof(MTotal);
sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0);
MTotal >>= 10;