Fixed compilation errors caused by latest commits

This commit is contained in:
Siteshwar Vashisht 2012-01-30 21:45:02 +05:30
parent 143091edad
commit f988dcd6f9
2 changed files with 7 additions and 5 deletions

View file

@ -20,6 +20,7 @@ Some of the code in this file is based on code from the Glibc manual.
#include <termios.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <algorithm>
#ifdef HAVE_SYS_TERMIOS_H
#include <sys/termios.h>
@ -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 );

2
proc.h
View file

@ -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
{
}