summaryrefslogtreecommitdiff
path: root/sysutils/gkrellm
diff options
context:
space:
mode:
authorcube <cube@pkgsrc.org>2004-07-05 08:42:27 +0000
committercube <cube@pkgsrc.org>2004-07-05 08:42:27 +0000
commit75fb385c669014cb23f6bd8aa9692fa699b5cb3c (patch)
treeb27ca935b189db70c587b9a52a8fdc499be2dd5b /sysutils/gkrellm
parent41df53b661088de63a6d2ffd9a80843d314d801b (diff)
downloadpkgsrc-75fb385c669014cb23f6bd8aa9692fa699b5cb3c.tar.gz
sysctl() uses size_t arguments for lengths, so don't pass a pointer to an
int, it breaks on 64-bits platforms. While there, prevent sa_family_t from being redefined by making sure __NetBSD_Version__ is defined. Bump revision of both gkrellm and gkrellm-server. Should fix PR 26144.
Diffstat (limited to 'sysutils/gkrellm')
-rw-r--r--sysutils/gkrellm/Makefile4
-rw-r--r--sysutils/gkrellm/distinfo5
-rw-r--r--sysutils/gkrellm/patches/patch-ab50
-rw-r--r--sysutils/gkrellm/patches/patch-ae12
4 files changed, 51 insertions, 20 deletions
diff --git a/sysutils/gkrellm/Makefile b/sysutils/gkrellm/Makefile
index 37ad0ff5003..659c1abb070 100644
--- a/sysutils/gkrellm/Makefile
+++ b/sysutils/gkrellm/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.36 2004/06/07 17:01:50 cube Exp $
+# $NetBSD: Makefile,v 1.37 2004/07/05 08:42:27 cube Exp $
.include "Makefile.common"
-PKGREVISION= 1
+PKGREVISION= 2
GKRELLM_PKGBASE= gkrellm
WRKSRC= ${GKRELLM_SRCDIR}
diff --git a/sysutils/gkrellm/distinfo b/sysutils/gkrellm/distinfo
index 9f73961b43d..f0eb4f122dc 100644
--- a/sysutils/gkrellm/distinfo
+++ b/sysutils/gkrellm/distinfo
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.26 2004/06/07 17:28:44 cube Exp $
+$NetBSD: distinfo,v 1.27 2004/07/05 08:42:27 cube Exp $
SHA1 (gkrellm-2.2.1.tar.bz2) = 4a4d296a61307b3a0b93da035c07e301ed474dbc
Size (gkrellm-2.2.1.tar.bz2) = 663952 bytes
SHA1 (patch-aa) = e7d7dc8f3189632a8a0855c3fc39479482407cc4
-SHA1 (patch-ab) = 9688dc53a784d808e79d04bbccd382305e6e2276
+SHA1 (patch-ab) = de2ef6e1d083a32c274d2ec42fa1b9e9d3d65663
SHA1 (patch-ac) = 8890d5a5e8eaf21508a1bf91de788183fd6f7a75
SHA1 (patch-ad) = c33319783a40ad64f43015200047656efc1bcdb3
+SHA1 (patch-ae) = 5f7b1bdfa99bcec9cfdaee3a97b38b27581dd954
diff --git a/sysutils/gkrellm/patches/patch-ab b/sysutils/gkrellm/patches/patch-ab
index a286ce9ef90..677aacae15a 100644
--- a/sysutils/gkrellm/patches/patch-ab
+++ b/sysutils/gkrellm/patches/patch-ab
@@ -1,8 +1,27 @@
-$NetBSD: patch-ab,v 1.12 2004/06/07 17:28:44 cube Exp $
+$NetBSD: patch-ab,v 1.13 2004/07/05 08:42:27 cube Exp $
--- src/sysdeps/netbsd.c.orig 2004-05-01 19:46:38.000000000 +0200
+++ src/sysdeps/netbsd.c
-@@ -109,41 +109,35 @@ get_ncpus(void)
+@@ -63,7 +63,8 @@ gkrellm_sys_cpu_read_data(void)
+ {
+ static int mib[] = { CTL_KERN, KERN_CP_TIME };
+ u_int64_t cp_time[ncpus][CPUSTATES];
+- int len, n;
++ int n;
++ size_t len;
+
+ if (ncpus > 1) {
+ len = sizeof(cp_time[0]);
+@@ -94,7 +95,7 @@ get_ncpus(void)
+ {
+ static int mib[] = { CTL_HW, HW_NCPU };
+ int ncpus;
+- int len = sizeof(int);
++ size_t len = sizeof(int);
+
+ if (sysctl(mib, 2, &ncpus, &len, NULL, 0) < 0)
+ return 1;
+@@ -109,41 +110,35 @@ get_ncpus(void)
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
@@ -30,16 +49,6 @@ $NetBSD: patch-ab,v 1.12 2004/06/07 17:28:44 cube Exp $
-
- if (sysctl(mib, 3, NULL, &len, NULL, 0) >= 0) {
- n_processes = len / sizeof(struct kinfo_proc);
-- }
--
-- /* get name list if it is not done yet */
-- if (kvmd == NULL) return;
-- if (nl[0].n_type == 0) kvm_nlist(kvmd, nl);
--
-- if (nl[0].n_type != 0) {
-- uvmexp = (struct uvmexp *)nl[X_UVM_EXP].n_value;
-- if (kvm_read(kvmd, (u_long)&uvmexp->forks, &i, sizeof(i)) == sizeof(i))
-- n_forks = i;
+ guint n_forks = 0, n_processes = 0;
+ struct uvmexp_sysctl uvmexp;
+ size_t size;
@@ -54,17 +63,26 @@ $NetBSD: patch-ab,v 1.12 2004/06/07 17:28:44 cube Exp $
+ n_processes = size / sizeof(struct kinfo_proc2);
}
+- /* get name list if it is not done yet */
+- if (kvmd == NULL) return;
+- if (nl[0].n_type == 0) kvm_nlist(kvmd, nl);
+-
+- if (nl[0].n_type != 0) {
+- uvmexp = (struct uvmexp *)nl[X_UVM_EXP].n_value;
+- if (kvm_read(kvmd, (u_long)&uvmexp->forks, &i, sizeof(i)) == sizeof(i))
+- n_forks = i;
+ mib[0] = CTL_VM;
+ mib[1] = VM_UVMEXP2;
+ size = sizeof(uvmexp);
+ if (sysctl(mib, 2, &uvmexp, &size, NULL, 0) >= 0) {
+ n_forks = uvmexp.forks;
-+ }
+ }
+-
+
if (getloadavg(&avenrun, 1) <= 0)
avenrun = 0;
gkrellm_proc_assign_data(n_processes, 0, n_forks, avenrun);
-@@ -183,6 +177,97 @@ gkrellm_sys_proc_init(void)
+@@ -183,6 +178,97 @@ gkrellm_sys_proc_init(void)
/* ===================================================================== */
@@ -162,7 +180,7 @@ $NetBSD: patch-ab,v 1.12 2004/06/07 17:28:44 cube Exp $
/* Sensor monitor interface */
/* Tables of voltage correction factors and offsets derived from the
-@@ -295,7 +380,7 @@ gkrellm_sys_sensors_init(void)
+@@ -295,7 +381,7 @@ gkrellm_sys_sensors_init(void)
int fd; /* file desc. for /dev/sysmon */
int id = 0; /* incremented for each sensor */
int type;
@@ -171,7 +189,7 @@ $NetBSD: patch-ab,v 1.12 2004/06/07 17:28:44 cube Exp $
gboolean found_sensors = FALSE;
/* check if some sensor is configured */
-@@ -336,3 +421,68 @@ gkrellm_sys_sensors_init(void)
+@@ -336,3 +422,68 @@ gkrellm_sys_sensors_init(void)
return found_sensors;
}
diff --git a/sysutils/gkrellm/patches/patch-ae b/sysutils/gkrellm/patches/patch-ae
new file mode 100644
index 00000000000..0aee833fab2
--- /dev/null
+++ b/sysutils/gkrellm/patches/patch-ae
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.1 2004/07/05 08:42:27 cube Exp $
+
+--- server/gkrellmd-private.h.orig 2004-05-03 04:21:48.000000000 +0200
++++ server/gkrellmd-private.h
+@@ -41,6 +41,7 @@
+
+ #if defined(__NetBSD__)
+ #define HAVE_GETADDRINFO 1
++#include <sys/param.h>
+ # if __NetBSD_Version__ <= 105010000
+ # define sa_family_t unsigned char
+ # endif