Add PR_SET_VMA and PR_SET_VMA_ANON_NAME to <sys/prctl.h>.
We've copied & pasted these to too many places. And if we're going to
have another go at upstreaming these, that's probably yet another reason
to have the *values* in just one place. (Even if upstream wants different
names, we'll likely keep the legacy names around for a while for source
compatibility.)
Bug: http://b/111903542
Test: ran tests
Change-Id: I8ccc557453d69530e5b74f865cbe0b458c84e3ba
diff --git a/tests/sys_prctl_test.cpp b/tests/sys_prctl_test.cpp
index 2123c94..7afa626 100644
--- a/tests/sys_prctl_test.cpp
+++ b/tests/sys_prctl_test.cpp
@@ -29,11 +29,10 @@
#include "android-base/file.h"
#include "android-base/strings.h"
-#include "private/bionic_prctl.h"
// http://b/20017123.
TEST(sys_prctl, bug_20017123) {
-#if defined(__ANDROID__) // PR_SET_VMA is only available in Android kernels.
+#if defined(PR_SET_VMA) // PR_SET_VMA is only available in Android kernels.
size_t page_size = static_cast<size_t>(sysconf(_SC_PAGESIZE));
void* p = mmap(NULL, page_size * 3, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
ASSERT_NE(MAP_FAILED, p);