diff options
author | jmc <jmc> | 2003-08-14 20:10:18 +0000 |
---|---|---|
committer | jmc <jmc> | 2003-08-14 20:10:18 +0000 |
commit | c77e4522850280e3d29cad2faaa44b2b8414af8f (patch) | |
tree | 1393236b99d2afadde325ed0a585f6f436e450ef | |
parent | 60e5e14a1911f40196673dd54e227d3453b275c0 (diff) | |
download | pkgsrc-c77e4522850280e3d29cad2faaa44b2b8414af8f.tar.gz |
Patch ksysguardd so it works on post SA merged NetBSD (p_priority isn't in
struct proc anymore so pull it from kinfo_proc2 instead)
-rw-r--r-- | x11/kdebase2/distinfo | 3 | ||||
-rw-r--r-- | x11/kdebase2/patches/patch-fe | 57 |
2 files changed, 59 insertions, 1 deletions
diff --git a/x11/kdebase2/distinfo b/x11/kdebase2/distinfo index d40ec6ad095..4f6af095323 100644 --- a/x11/kdebase2/distinfo +++ b/x11/kdebase2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2001/12/04 20:35:37 skrll Exp $ +$NetBSD: distinfo,v 1.17 2003/08/14 20:10:18 jmc Exp $ SHA1 (kdebase-2.2.2.tar.bz2) = dbbc8dec49b9bb15055ce43e1b4eafe6945463b0 Size (kdebase-2.2.2.tar.bz2) = 12888455 bytes @@ -140,3 +140,4 @@ SHA1 (patch-fa) = bccd1a6d1939ef1c97c3c45ec9e3619b568eca09 SHA1 (patch-fb) = 8f95df054822fd535c967ea770e6c65af6545b20 SHA1 (patch-fc) = 5b3da5ab4370d01c1378a4e14467fd05e58932b7 SHA1 (patch-fd) = 5f56f987336f37158e8be2e6d2e270c4e4282bc7 +SHA1 (patch-fe) = 0b6021621752304269ce042b16b80893840413ac diff --git a/x11/kdebase2/patches/patch-fe b/x11/kdebase2/patches/patch-fe new file mode 100644 index 00000000000..8b7069cd45b --- /dev/null +++ b/x11/kdebase2/patches/patch-fe @@ -0,0 +1,57 @@ +$NetBSD: patch-fe,v 1.1 2003/08/14 20:10:19 jmc Exp $ + +--- ksysguard/ksysguardd/FreeBSD/ProcessList.c.orig 2003-08-14 14:27:23.000000000 +0000 ++++ ksysguard/ksysguardd/FreeBSD/ProcessList.c 2003-08-14 14:47:10.000000000 +0000 +@@ -37,6 +37,10 @@ + #include <sys/user.h> + #include <unistd.h> + ++#if defined __NetBSD__ ++#include <sys/param.h> ++#endif ++ + #include "../../gui/SignalIDs.h" + #include "Command.h" + #include "ProcessList.h" +@@ -164,9 +168,12 @@ + + ProcessInfo* ps; + struct passwd* pwent; +- int mib[4]; ++ int mib[6]; + struct kinfo_proc p; + size_t len; ++#if defined(__NetBSD__) && (__NetBSD_Version__ > 106120000) ++ struct kinfo_proc2 p2; ++#endif + + if ((ps = findProcessInList(pid)) == 0) + { +@@ -187,7 +194,14 @@ + len = sizeof (p); + if (sysctl(mib, 4, &p, &len, NULL, 0) == -1 || !len) + return -1; +- ++#if defined(__NetBSD__) && (__NetBSD_Version__ > 106120000) ++ mib[1] = KERN_PROC2; ++ mib[5] = sizeof(struct kinfo_proc2); ++ mib[6] = 1; ++ len = sizeof(p2); ++ if (sysctl(mib, 6, &p2, &len, NULL, 0) == -1 || !len) ++ return -1; ++#endif + #if __FreeBSD_version >= 500015 + ps->pid = p.ki_pid; + ps->ppid = p.ki_ppid; +@@ -200,7 +214,11 @@ + ps->ppid = p.kp_eproc.e_ppid; + ps->uid = p.kp_eproc.e_ucred.cr_uid; + ps->gid = p.kp_eproc.e_pgid; ++#if defined(__NetBSD__) && (__NetBSD_Version__ > 106120000) ++ ps->priority = p2.p_priority; ++#else + ps->priority = p.kp_proc.p_priority; ++#endif + ps->niceLevel = p.kp_proc.p_nice; + #endif + |