Don't call getpagesize more than once

This commit is contained in:
H.J. Lu 2015-04-11 16:49:09 -07:00
parent 2c008f9a5b
commit 263b1a3c1f

View File

@ -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);