netbsd cp_time always 64-bit

This commit is contained in:
Doug MacEachern 2008-04-11 02:45:55 +00:00
parent ee5d7a6e9f
commit 7bfcc25b6f
1 changed files with 8 additions and 2 deletions

View File

@ -608,10 +608,16 @@ int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap)
return SIGAR_OK;
}
#ifdef __NetBSD__
#ifndef KERN_CPTIME
#define KERN_CPTIME KERN_CP_TIME
#endif
#if defined(__NetBSD__)
typedef uint64_t cp_time_t;
#else
typedef unsigned long cp_time_t;
#endif
int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
{
#if defined(DARWIN)
@ -635,7 +641,7 @@ int sigar_cpu_get(sigar_t *sigar, sigar_cpu_t *cpu)
#elif defined(__FreeBSD__) || (__OpenBSD__) || defined(__NetBSD__)
int status;
unsigned long cp_time[CPUSTATES];
cp_time_t cp_time[CPUSTATES];
size_t size = sizeof(cp_time);
# if defined(__OpenBSD__) || defined(__NetBSD__)