diff options
author | joerg <joerg@pkgsrc.org> | 2008-10-08 15:53:42 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-10-08 15:53:42 +0000 |
commit | e4ca544debe0c8a1c9edb906f9ac2a3ed723b49e (patch) | |
tree | 5cba6d9d27d07fc89baa382974d23ef47cbc2139 /sysutils/monit/patches | |
parent | 92b736390447192dd49f4b4f5e3cb2934f79c3a8 (diff) | |
download | pkgsrc-e4ca544debe0c8a1c9edb906f9ac2a3ed723b49e.tar.gz |
Fix build on NetBSD current.
Diffstat (limited to 'sysutils/monit/patches')
-rw-r--r-- | sysutils/monit/patches/patch-ab | 32 |
1 files changed, 32 insertions, 0 deletions
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) + { |