diff options
author | martti <martti@pkgsrc.org> | 2005-09-27 12:49:08 +0000 |
---|---|---|
committer | martti <martti@pkgsrc.org> | 2005-09-27 12:49:08 +0000 |
commit | e29b94a7c8d4d72c8ed4d10212feba5c1f782582 (patch) | |
tree | b9baefa6483669ec9a829a3d0e9bb9a5d2e6a4e2 | |
parent | 6aa1e8b1b7f722a4b8e849cdad79f2b0d6d6ac93 (diff) | |
download | pkgsrc-e29b94a7c8d4d72c8ed4d10212feba5c1f782582.tar.gz |
Fix compilation problems on NetBSD 1.6.2
-rw-r--r-- | sysutils/xfce4-systemload-plugin/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xfce4-systemload-plugin/patches/patch-aa | 66 |
2 files changed, 42 insertions, 28 deletions
diff --git a/sysutils/xfce4-systemload-plugin/distinfo b/sysutils/xfce4-systemload-plugin/distinfo index a455c92fba6..50f2052d859 100644 --- a/sysutils/xfce4-systemload-plugin/distinfo +++ b/sysutils/xfce4-systemload-plugin/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.5 2005/09/14 11:55:57 martti Exp $ +$NetBSD: distinfo,v 1.6 2005/09/27 12:49:08 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 +SHA1 (patch-aa) = 8889a9dcf8f10fd4e6f8597d849efc838c202b56 diff --git a/sysutils/xfce4-systemload-plugin/patches/patch-aa b/sysutils/xfce4-systemload-plugin/patches/patch-aa index 38d8e33c160..c0ce249532b 100644 --- a/sysutils/xfce4-systemload-plugin/patches/patch-aa +++ b/sysutils/xfce4-systemload-plugin/patches/patch-aa @@ -1,42 +1,56 @@ -$NetBSD: patch-aa,v 1.1 2005/09/14 11:55:57 martti Exp $ +$NetBSD: patch-aa,v 1.2 2005/09/27 12:49:08 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 @@ ++++ panel-plugin/memswap.c 2005-09-27 12:39:16.000000000 +0300 +@@ -284,7 +284,24 @@ #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; -+ } ++ static int mib[2]; ++ ++#ifdef HW_PHYSMEM64 ++ /* 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; ++ } ++#else ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM; ++#endif ++ len = sizeof(MTotal); sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0); MTotal >>= 10; -@@ -395,7 +405,17 @@ +@@ -395,7 +412,24 @@ #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; -+ } ++ static int mib[2]; ++ ++#ifdef HW_PHYSMEM64 ++ /* 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; ++ } ++#else ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM; ++#endif ++ len = sizeof(MTotal); sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0); MTotal >>= 10; |