summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg>2008-10-08 15:53:42 +0000
committerjoerg <joerg>2008-10-08 15:53:42 +0000
commit2cbcf4ef087f07b859dd3303bc7f7203d7d40d02 (patch)
tree5cba6d9d27d07fc89baa382974d23ef47cbc2139 /sysutils
parent8a79fc8e6b6dfd116fcc3a08eeb6055d68559424 (diff)
downloadpkgsrc-2cbcf4ef087f07b859dd3303bc7f7203d7d40d02.tar.gz
Fix build on NetBSD current.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/monit/distinfo3
-rw-r--r--sysutils/monit/patches/patch-ab32
2 files changed, 34 insertions, 1 deletions
diff --git a/sysutils/monit/distinfo b/sysutils/monit/distinfo
index 4cfcfb69e61..261903c310b 100644
--- a/sysutils/monit/distinfo
+++ b/sysutils/monit/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2007/12/15 16:41:50 seb Exp $
+$NetBSD: distinfo,v 1.3 2008/10/08 15:53:42 joerg Exp $
SHA1 (monit-4.10.1.tar.gz) = c87aa0c6e0b1d13f46b7e9d84937191e25a907a6
RMD160 (monit-4.10.1.tar.gz) = 6c517b19bc43f4023dfca4de1df09272b41af02d
Size (monit-4.10.1.tar.gz) = 606273 bytes
SHA1 (patch-aa) = b51792edf22fb9867d45a4adb2aadd03dbe5467c
+SHA1 (patch-ab) = c661d0d9a8bfbabb2e7964eec54204e46b15f620
diff --git a/sysutils/monit/patches/patch-ab b/sysutils/monit/patches/patch-ab
new file mode 100644
index 00000000000..b92e9d61023
--- /dev/null
+++ b/sysutils/monit/patches/patch-ab
@@ -0,0 +1,32 @@
+$NetBSD: patch-ab,v 1.3 2008/10/08 15:53:42 joerg Exp $
+
+--- process/sysdep_NETBSD.c.orig 2007-07-29 20:23:26.000000000 +0000
++++ process/sysdep_NETBSD.c
+@@ -55,6 +55,8 @@
+ #include <sys/dkstat.h>
+ #endif
+
++#include <sys/param.h>
++
+ #include "monitor.h"
+ #include "process.h"
+ #include "process_sysdep.h"
+@@ -171,9 +173,18 @@ int initprocesstree_sysdep(ProcessTree_T
+ {
+ pt[i].pid = pinfo[i].kp_proc.p_pid;
+ pt[i].ppid = pinfo[i].kp_eproc.e_ppid;
++#ifndef __NetBSD_Prereq__
++#define __NetBSD_Prereq__(a,b,c) 0
++#endif
++#if __NetBSD_Prereq__(4,99,44)
++ pt[i].cputime = (long)((pinfo[i].kp_proc.p_rtime.sec << 4) +
++ (pinfo[i].kp_proc.p_rtime.frac >> 60)
++ );
++#else
+ pt[i].cputime = (long)((pinfo[i].kp_proc.p_rtime.tv_sec * 10) +
+ (pinfo[i].kp_proc.p_rtime.tv_usec / 100000)
+ );
++#endif
+ pt[i].mem_kbyte = (unsigned long)(pinfo[i].kp_eproc.e_vm.vm_rssize * pagesize_kbyte);
+ if(pinfo[i].kp_proc.p_stat == SZOMB)
+ {