diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/mmap64.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c index e2dcdc4d9a..4ba686c8fb 100644 --- a/sysdeps/unix/sysv/linux/mmap64.c +++ b/sysdeps/unix/sysv/linux/mmap64.c @@ -42,9 +42,8 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset) #if MMAP2_PAGE_SHIFT == -1 if (page_shift == 0) { - int page_size = getpagesize (); - while ((1 << ++page_shift) != page_size) - ; + int page_size = __getpagesize (); + page_shift = __ffs (page_size) - 1; } #endif if (offset & ((1 << page_shift) - 1)) |