diff --git a/libc/bionic/malloc_debug_qemu.cpp b/libc/bionic/malloc_debug_qemu.cpp index fa40b3585..b01cef2a9 100644 --- a/libc/bionic/malloc_debug_qemu.cpp +++ b/libc/bionic/malloc_debug_qemu.cpp @@ -612,7 +612,7 @@ extern "C" bool malloc_debug_initialize(HashTable*, const MallocDebug* malloc_di error_log("Unable to open /dev/qemu_trace"); return false; } else { - qtrace = mmap(NULL, PAGESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + qtrace = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); if (qtrace == MAP_FAILED) { diff --git a/libc/bionic/sysconf.cpp b/libc/bionic/sysconf.cpp index 61039b2af..8a55f7e90 100644 --- a/libc/bionic/sysconf.cpp +++ b/libc/bionic/sysconf.cpp @@ -97,8 +97,10 @@ long sysconf(int name) { case _SC_ATEXIT_MAX: return LONG_MAX; // Unlimited. case _SC_IOV_MAX: return UIO_MAXIOV; - case _SC_PAGESIZE: // Fall through, PAGESIZE and PAGE_SIZE always hold the same value. - case _SC_PAGE_SIZE: return static_cast(getauxval(AT_PAGESZ)); + // _SC_PAGESIZE and _SC_PAGE_SIZE are distinct, but return the same value. + case _SC_PAGESIZE: + case _SC_PAGE_SIZE: + return static_cast(getauxval(AT_PAGESZ)); case _SC_XOPEN_UNIX: return _XOPEN_UNIX; case _SC_AIO_LISTIO_MAX: return _POSIX_AIO_LISTIO_MAX; // Minimum requirement. diff --git a/libc/include/limits.h b/libc/include/limits.h index 685e1847d..9d7a0daa3 100644 --- a/libc/include/limits.h +++ b/libc/include/limits.h @@ -85,9 +85,6 @@ #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif -#ifndef PAGESIZE -#define PAGESIZE PAGE_SIZE -#endif #define SEM_VALUE_MAX 0x3fffffff