bionic: PAGE_SIZE macro won't be used in page size agnostic targets
When the C flag -D__BIONIC_NO_PAGE_SIZE_MACRO is defined,
the PAGE_SIZE macro won't be used for page size agnostic builds.
Note: Only arm64 architectures support page size agnostic builds.
Bug: 277272383
Bug: 289419664
Test: source build/envsetup.sh
lunch aosp_cf_arm64_phone_pgagnostic
m
source build/envsetup.sh
lunch aosp_cf_x86_64_phone
m
Change-Id: I755d5fcdd493fe6da5277a60d8e90805e9b2754d
diff --git a/libc/include/sys/user.h b/libc/include/sys/user.h
index 432c7cb..0ea0285 100644
--- a/libc/include/sys/user.h
+++ b/libc/include/sys/user.h
@@ -34,8 +34,10 @@
__BEGIN_DECLS
+#if !defined(__BIONIC_NO_PAGE_SIZE_MACRO)
#define PAGE_SIZE 4096
#define PAGE_MASK (~(PAGE_SIZE - 1))
+#endif
#if defined(__i386__)