diff options
author | minskim <minskim> | 2007-02-17 09:47:59 +0000 |
---|---|---|
committer | minskim <minskim> | 2007-02-17 09:47:59 +0000 |
commit | 210a0dcd9657e22a0eea3b6ab17cd5100d2851fa (patch) | |
tree | cd73a045f751cd761adb5e8529670ad42d433c2a /sysutils/pscpug | |
parent | fbbb21972db66e1898dc3e88f2fca6593e7dc1b8 (diff) | |
download | pkgsrc-210a0dcd9657e22a0eea3b6ab17cd5100d2851fa.tar.gz |
Add a patch to make this build on DragonFly BSD. Submitted by MAINTAINER.
Diffstat (limited to 'sysutils/pscpug')
-rw-r--r-- | sysutils/pscpug/distinfo | 3 | ||||
-rw-r--r-- | sysutils/pscpug/patches/patch-ab | 43 |
2 files changed, 45 insertions, 1 deletions
diff --git a/sysutils/pscpug/distinfo b/sysutils/pscpug/distinfo index 34491dc8912..a7af55c2074 100644 --- a/sysutils/pscpug/distinfo +++ b/sysutils/pscpug/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2007/01/27 00:21:33 minskim Exp $ +$NetBSD: distinfo,v 1.2 2007/02/17 09:47:59 minskim Exp $ SHA1 (pscpug032.tgz) = 03da889738d791e3316a91da10b20be83662d977 RMD160 (pscpug032.tgz) = fc3aa7289e0051f0f25b5695987d77a7f93d4fbb Size (pscpug032.tgz) = 40378 bytes SHA1 (patch-aa) = 850f16cdbd285e7700f2b75e3dbcf051bf43f56c +SHA1 (patch-ab) = c252d1f567ca510d3cb3542e5ad36eaece107f19 diff --git a/sysutils/pscpug/patches/patch-ab b/sysutils/pscpug/patches/patch-ab new file mode 100644 index 00000000000..7d061ad98c8 --- /dev/null +++ b/sysutils/pscpug/patches/patch-ab @@ -0,0 +1,43 @@ +$NetBSD: patch-ab,v 1.1 2007/02/17 09:47:59 minskim Exp $ + +--- psinfo.c.orig 2006-06-23 04:28:38.000000000 +0200 ++++ psinfo.c +@@ -48,7 +48,11 @@ + + #if defined(USE_MACH) || defined(USE_KVM) + #include <sys/fcntl.h> ++#if defined(__DragonFly__) ++#include <sys/user.h> ++#else + #include <sys/proc.h> ++#endif + #include <sys/sysctl.h> + #endif + +@@ -238,7 +242,7 @@ float getProcessCPUPercentByProcessID(in + #elif defined(USE_KVM) + { + int found, fscale; +- struct kinfo_proc2 *givenproc; ++ struct kinfo_proc *givenproc; + struct nlist readnl[] = {{"_fscale"}, {NULL}}; + kvm_t *kd; + +@@ -260,7 +264,7 @@ float getProcessCPUPercentByProcessID(in + + + /* get proc */ +- givenproc = kvm_getproc2(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc2), &found); ++ givenproc = kvm_getprocs(kd, KERN_PROC_PID, pid, &found); + + switch (found) { + case 0: +@@ -270,7 +274,7 @@ float getProcessCPUPercentByProcessID(in + /* these maths gleaned from NetBSD top and ps */ + #define fxtofl(fixpt) ((double)(fixpt) / fscale) + +- cpuval = (100 * fxtofl(givenproc->p_pctcpu)); ++ cpuval = (100 * fxtofl(givenproc->kp_proc.p_pctcpu)); + + Valid = true; + break; |