tests: Add HAVE_MMAP check for MinGW.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 14 Nov 2017 00:01:50 +0000 (09:01 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 14 Nov 2017 00:01:50 +0000 (09:01 +0900)
* tests/t-secmem.c (main): Conditionalize with HAVE_MMAP.

--

Thanks to: Andreas Metzler <ametzler@bebt.de>

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
tests/t-secmem.c

index ecbc55a..baf013d 100644 (file)
@@ -120,11 +120,13 @@ main (int argc, char **argv)
   long int pgsize_val = -1;
   size_t pgsize;
 
+#if HAVE_MMAP
 # if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
   pgsize_val = sysconf (_SC_PAGESIZE);
 # elif defined(HAVE_GETPAGESIZE)
   pgsize_val = getpagesize ();
 # endif
+#endif
   pgsize = (pgsize_val > 0)? pgsize_val : DEFAULT_PAGE_SIZE;
 
   pool_size = (MINIMUM_POOL_SIZE + pgsize - 1) & ~(pgsize - 1);