aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_include/gralloc_helper.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_include/gralloc_helper.h b/tests/test_include/gralloc_helper.h
index b6cd24d..9741c33 100644
--- a/tests/test_include/gralloc_helper.h
+++ b/tests/test_include/gralloc_helper.h
@@ -47,7 +47,8 @@
static inline size_t round_up_to_page_size(size_t x)
{
- return (x + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+ const size_t page_size = getpagesize();
+ return (x + (page_size - 1)) & ~(page_size - 1);
}
#endif /* GRALLOC_HELPER_H_ */