diff --git a/proc.cpp b/proc.cpp index 07e82886d..c7f49bd30 100644 --- a/proc.cpp +++ b/proc.cpp @@ -20,6 +20,7 @@ Some of the code in this file is based on code from the Glibc manual. #include #include #include +#include #ifdef HAVE_SYS_TERMIOS_H #include @@ -771,12 +772,13 @@ unsigned long proc_get_jiffies( process_t *p ) */ void proc_update_jiffies() { - job_t *j; + job_t* job; process_t *p; - - for( j=first_job; j; j=j->next ) + job_iterator_t j; + + for( job = j.next(); job; job = j.next() ) { - for( p=j->first_process; p; p=p->next ) + for( p=job->first_process; p; p=p->next ) { gettimeofday( &p->last_time, 0 ); p->last_jiffies = proc_get_jiffies( p ); diff --git a/proc.h b/proc.h index ef9ea3ab6..e4174889c 100644 --- a/proc.h +++ b/proc.h @@ -156,7 +156,7 @@ class process_t next(NULL) #ifdef HAVE__PROC_SELF_STAT ,last_time(), - unsigned long last_jiffies(0) + last_jiffies(0) #endif { }