use kstat_named_t.value.ui64 when built for sparc64
This commit is contained in:
parent
f18113ec22
commit
ee70e39574
|
@ -253,9 +253,15 @@ struct sigar_t {
|
|||
solaris_mib2_t mib2;
|
||||
};
|
||||
|
||||
#ifdef SIGAR_64BIT
|
||||
#define KSTAT_UINT ui64
|
||||
#else
|
||||
#define KSTAT_UINT ui32
|
||||
#endif
|
||||
|
||||
#define kSTAT_uint(v, type) \
|
||||
((sigar->koffsets.type[v] == -2) ? 0 : \
|
||||
((kstat_named_t *)ksp->ks_data + sigar->koffsets.type[v])->value.ui32)
|
||||
((kstat_named_t *)ksp->ks_data + sigar->koffsets.type[v])->value.KSTAT_UINT)
|
||||
|
||||
#define kSYSTEM(v) kSTAT_uint(v, system)
|
||||
|
||||
|
|
|
@ -824,7 +824,7 @@ static int ucb_ps_args_get(sigar_t *sigar, sigar_pid_t pid,
|
|||
}
|
||||
else {
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"/usr/ucb/ps -ww %ld", pid);
|
||||
"/usr/ucb/ps -ww %ld", (long)pid);
|
||||
|
||||
if (!(fp = popen(buffer, "r"))) {
|
||||
return errno;
|
||||
|
@ -1991,7 +1991,7 @@ static void ifstat_kstat_common(sigar_net_interface_stat_t *ifstat,
|
|||
int i;
|
||||
|
||||
for (i=0; i<ndata; i++) {
|
||||
sigar_uint64_t value = data[i].value.ui32;
|
||||
sigar_uint64_t value = data[i].value.KSTAT_UINT;
|
||||
|
||||
char *ptr = data[i].name;
|
||||
|
||||
|
|
Loading…
Reference in New Issue