Remove <asm/page.h>.
If we have PAGE_SIZE/PAGESIZE, POSIX says they should be in <limits.h>.
Change-Id: I3c2d574ea2aea81f524874a156361411a4ffa18e
diff --git a/libc/bionic/ndk_cruft.cpp b/libc/bionic/ndk_cruft.cpp
index 3637c3e..fc9d9d4 100644
--- a/libc/bionic/ndk_cruft.cpp
+++ b/libc/bionic/ndk_cruft.cpp
@@ -40,7 +40,7 @@
// getpagesize() and __getpageshift(). Needed for backwards compatibility with old NDK apps.
extern "C" {
unsigned int __page_size = PAGE_SIZE;
- unsigned int __page_shift = PAGE_SHIFT;
+ unsigned int __page_shift = 12;
}
// TODO: remove this backward compatibility hack (for jb-mr1 strace binaries).
diff --git a/libc/bionic/stubs.cpp b/libc/bionic/stubs.cpp
index 707036a..2c2b74b 100644
--- a/libc/bionic/stubs.cpp
+++ b/libc/bionic/stubs.cpp
@@ -480,7 +480,7 @@
UNIMPLEMENTED;
}
-// Portable code should use sysconf(_SC_PAGESIZE) directly instead.
+// Portable code should use sysconf(_SC_PAGE_SIZE) directly instead.
int getpagesize() {
- return sysconf(_SC_PAGESIZE);
+ return sysconf(_SC_PAGE_SIZE);
}
diff --git a/libc/bionic/sysconf.cpp b/libc/bionic/sysconf.cpp
index db808c2..233e57c 100644
--- a/libc/bionic/sysconf.cpp
+++ b/libc/bionic/sysconf.cpp
@@ -229,8 +229,11 @@
#endif
case _SC_ATEXIT_MAX: return SYSTEM_ATEXIT_MAX;
case _SC_IOV_MAX: return SYSTEM_IOV_MAX;
- case _SC_PAGESIZE: return PAGE_SIZE;
- case _SC_PAGE_SIZE: return PAGE_SIZE;
+
+ case _SC_PAGESIZE:
+ case _SC_PAGE_SIZE:
+ return PAGE_SIZE;
+
#ifdef _XOPEN_UNIX
case _SC_XOPEN_UNIX: return _XOPEN_UNIX;
#endif