From a50c77a330c2901f88c7ae1143a7626a7888485c Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 13 Feb 2005 05:13:30 +0000 Subject: [PATCH] compile again on freebsd 4.x --- src/os/darwin/darwin_sigar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index e42bff73..040ea99c 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -50,6 +50,7 @@ #define KI_TSZ ki_tsize #define KI_DSZ ki_dsize #define KI_SSZ ki_ssize +#define KI_FLAG ki_flag #else #define KI_PID kp_proc.p_pid @@ -67,6 +68,7 @@ #define KI_TSZ kp_eproc.e_vm.vm_tsize #define KI_DSZ kp_eproc.e_vm.vm_dsize #define KI_SSZ kp_eproc.e_vm.vm_ssize +#define KI_FLAG kp_eproc.e_flag #endif #ifndef DARWIN @@ -389,6 +391,11 @@ int sigar_loadavg_get(sigar_t *sigar, return SIGAR_OK; } +#ifndef KERN_PROC_PROC +/* freebsd 4.x */ +#define KERN_PROC_PROC KERN_PROC_ALL +#endif + int sigar_proc_list_get(sigar_t *sigar, sigar_proc_list_t *proclist) { @@ -434,7 +441,7 @@ int sigar_proc_list_get(sigar_t *sigar, sigar_proc_list_create(proclist); for (i=0; i