--- projects/libstatgrab/src/libstatgrab/os_info.c 2004/11/01 18:30:17 1.20 +++ projects/libstatgrab/src/libstatgrab/os_info.c 2004/11/06 14:55:53 1.21 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: os_info.c,v 1.20 2004/11/01 18:30:17 tdb Exp $ + * $Id: os_info.c,v 1.21 2004/11/06 14:55:53 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -58,7 +58,7 @@ sg_host_info *sg_get_host_info(){ static struct utsname os; #ifdef HPUX - struct pst_static pstat_static; + struct pst_static *pstat_static; time_t currtime; long boottime; #endif @@ -91,14 +91,14 @@ sg_host_info *sg_get_host_info(){ /* get uptime */ #ifdef HPUX - if (pstat_getstatic(&pstat_static, sizeof(pstat_static), 1, 0) == -1) { - sg_set_error_with_errno(SG_ERROR_PSTAT, "pstat_static"); + pstat_static = sg_get_pstat_static(); + if (pstat_static == NULL) { return NULL; } currtime = time(NULL); - boottime = pstat_static.boot_time; + boottime = pstat_static->boot_time; general_stat.uptime = currtime - boottime; #endif