--- projects/cms/source/ihost/libstatgrab/load_stat.c 2002/05/18 18:15:56 1.6 +++ projects/cms/source/ihost/libstatgrab/load_stat.c 2002/05/30 12:33:08 1.9 @@ -1,5 +1,6 @@ /* * i-scream central monitoring system + * http://www.i-scream.org.uk * Copyright (C) 2000-2002 i-scream * * This program is free software; you can redistribute it and/or @@ -17,6 +18,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #ifdef SOLARIS @@ -28,13 +33,13 @@ char *get_load_stats(){ double loadav[3]; char *xml_load_out; -#ifdef OLDLINUX +#if !defined(HAVE_GETLOADAVG) && defined(LINUX) FILE *f; char *loadavg; char *load_p; #endif -#ifdef OLDLINUX +#if !defined(HAVE_GETLOADAVG) && defined(LINUX) if ((f=fopen("/proc/loadavg", "r" ))==NULL) { errf("Failed to open load averages (%m)"); return NULL;