compile again on freebsd 4.x

This commit is contained in:
Doug MacEachern 2005-02-13 05:13:30 +00:00
parent 6f86a07623
commit a50c77a330
1 changed files with 8 additions and 1 deletions

View File

@ -50,6 +50,7 @@
#define KI_TSZ ki_tsize #define KI_TSZ ki_tsize
#define KI_DSZ ki_dsize #define KI_DSZ ki_dsize
#define KI_SSZ ki_ssize #define KI_SSZ ki_ssize
#define KI_FLAG ki_flag
#else #else
#define KI_PID kp_proc.p_pid #define KI_PID kp_proc.p_pid
@ -67,6 +68,7 @@
#define KI_TSZ kp_eproc.e_vm.vm_tsize #define KI_TSZ kp_eproc.e_vm.vm_tsize
#define KI_DSZ kp_eproc.e_vm.vm_dsize #define KI_DSZ kp_eproc.e_vm.vm_dsize
#define KI_SSZ kp_eproc.e_vm.vm_ssize #define KI_SSZ kp_eproc.e_vm.vm_ssize
#define KI_FLAG kp_eproc.e_flag
#endif #endif
#ifndef DARWIN #ifndef DARWIN
@ -389,6 +391,11 @@ int sigar_loadavg_get(sigar_t *sigar,
return SIGAR_OK; 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, int sigar_proc_list_get(sigar_t *sigar,
sigar_proc_list_t *proclist) sigar_proc_list_t *proclist)
{ {
@ -434,7 +441,7 @@ int sigar_proc_list_get(sigar_t *sigar,
sigar_proc_list_create(proclist); sigar_proc_list_create(proclist);
for (i=0; i<num; i++) { for (i=0; i<num; i++) {
if (proc[i].ki_flag & P_SYSTEM) { if (proc[i].KI_FLAG & P_SYSTEM) {
continue; continue;
} }
SIGAR_PROC_LIST_GROW(proclist); SIGAR_PROC_LIST_GROW(proclist);