From: octo Date: Thu, 15 Jun 2006 20:37:27 +0000 (+0000) Subject: solaris-fixes branch: Change `pagesize' to be a `unsigned long long'. X-Git-Tag: collectd-3.9.4~9 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=26637429d421175fb7db798d7d9da26d669b39b5;p=collectd.git solaris-fixes branch: Change `pagesize' to be a `unsigned long long'. Christophe Kalt is having problems with what appears to be a 32bit overflow. This is just to make sure the multiplications with `pagesize' are not causing this. --- diff --git a/src/swap.c b/src/swap.c index 1595cdec..f8ce93f3 100644 --- a/src/swap.c +++ b/src/swap.c @@ -53,7 +53,7 @@ static char *ds_def[] = static int ds_num = 4; #ifdef KERNEL_SOLARIS -static int pagesize; +static unsigned long long pagesize; static kstat_t *ksp; #endif /* KERNEL_SOLARIS */ @@ -61,7 +61,7 @@ static void swap_init (void) { #ifdef KERNEL_SOLARIS /* getpagesize(3C) tells me this does not fail.. */ - pagesize = getpagesize (); + pagesize = (unsigned long long) getpagesize (); if (get_kstat (&ksp, "unix", 0, "system_pages")) ksp = NULL; #endif /* KERNEL_SOLARIS */