aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index 67d3d17..a0a02e4 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -497,7 +497,8 @@ bfd_cache_init (bfd *abfd)
return FALSE;
}
#ifdef HAVE_MMAP
- pagesize_m1 = getpagesize () - 1;
+ if (pagesize_m1 == 0)
+ pagesize_m1 = getpagesize () - 1;
#endif
abfd->iovec = &cache_iovec;
insert (abfd);