summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/badsalt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/badsalt.c b/test/badsalt.c
index ecad067..ccf2d6c 100644
--- a/test/badsalt.c
+++ b/test/badsalt.c
@@ -662,13 +662,14 @@ main (int argc, char **argv)
/* Set up a two-page region whose first page is read-write and
whose second page is inaccessible. */
- size_t pagesize = (size_t) sysconf (_SC_PAGESIZE);
- if (pagesize < CRYPT_OUTPUT_SIZE)
+ long pagesize_l = sysconf (_SC_PAGESIZE);
+ if (pagesize_l < (long) CRYPT_OUTPUT_SIZE)
{
- printf ("ERROR: pagesize of %zu is too small\n", pagesize);
+ printf ("ERROR: pagesize of %ld is too small\n", pagesize_l);
return 99;
}
+ size_t pagesize = (size_t) pagesize_l;
char *page = mmap (0, pagesize * 2, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1, 0);
if (page == MAP_FAILED)