aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-02 23:03:08 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-02 23:03:08 +0000
commit51a6dae46adea41d91bfe11c7e36eefba24ac61d (patch)
tree844a2f7b44038798833ec9ebb6a6591e8d4c8f20
parenta4d431ec358fb80ee679b6354b6bceed54e14c7a (diff)
parentb9ae59025f9930fa8b4c24b51633149871d63bb8 (diff)
downloaddrm_hwcomposer-sdk-release.tar.gz
Snap for 11662267 from b9ae59025f9930fa8b4c24b51633149871d63bb8 to sdk-releasesdk-release
Change-Id: I3a9b053e90efc6a1fb7806cbf16889632ac46181
-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_ */