diff options
author | Elliott Hughes <enh@google.com> | 2018-08-22 10:36:23 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-08-22 10:36:23 -0700 |
commit | 99d54656bda40edb817e6bc6de9a85d88ef4e6b5 (patch) | |
tree | 1a176f12c89582f0d06a3376ef66c6281d8af01c /tests/sys_prctl_test.cpp | |
parent | 8f2298e73f4d930b58a8466fd7264e9a88c96d99 (diff) |
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
Diffstat (limited to 'tests/sys_prctl_test.cpp')
-rw-r--r-- | tests/sys_prctl_test.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/sys_prctl_test.cpp b/tests/sys_prctl_test.cpp index 2123c944e..7afa626a6 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); |