From 26637429d421175fb7db798d7d9da26d669b39b5 Mon Sep 17 00:00:00 2001 From: octo Date: Thu, 15 Jun 2006 20:37:27 +0000 Subject: [PATCH] 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. --- src/swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.11.0