summaryrefslogtreecommitdiffstats
path: root/libnativebridge
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-07-30 08:47:35 -0700
committerElliott Hughes <enh@google.com>2015-07-30 09:33:43 -0700
commit9b828adfad09200f3f1bd3602187fe3dd5335774 (patch)
treedbea9a10676206346b39e428e74ee630a1a71219 /libnativebridge
parentdcf890914c7571d3068046b9df1f672e9f45b4d2 (diff)
downloadsystem_core-9b828adfad09200f3f1bd3602187fe3dd5335774.tar.gz
system_core-9b828adfad09200f3f1bd3602187fe3dd5335774.tar.bz2
system_core-9b828adfad09200f3f1bd3602187fe3dd5335774.zip
Use __ANDROID__ instead of HAVE_ANDROID_OS.
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
Diffstat (limited to 'libnativebridge')
-rw-r--r--libnativebridge/native_bridge.cc4
-rw-r--r--libnativebridge/tests/PreInitializeNativeBridge_test.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index a9671a97a..32a65ea04 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -295,13 +295,13 @@ bool PreInitializeNativeBridge(const char* app_data_dir_in, const char* instruct
// so we save the extra file existence check.
char cpuinfo_path[1024];
-#ifdef HAVE_ANDROID_OS
+#if defined(__ANDROID__)
snprintf(cpuinfo_path, sizeof(cpuinfo_path), "/system/lib"
#ifdef __LP64__
"64"
#endif // __LP64__
"/%s/cpuinfo", instruction_set);
-#else // !HAVE_ANDROID_OS
+#else // !__ANDROID__
// To be able to test on the host, we hardwire a relative path.
snprintf(cpuinfo_path, sizeof(cpuinfo_path), "./cpuinfo");
#endif
diff --git a/libnativebridge/tests/PreInitializeNativeBridge_test.cpp b/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
index cec26ce50..d3bbebefd 100644
--- a/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
+++ b/libnativebridge/tests/PreInitializeNativeBridge_test.cpp
@@ -32,8 +32,8 @@ static constexpr const char* kTestData = "PreInitializeNativeBridge test.";
TEST_F(NativeBridgeTest, PreInitializeNativeBridge) {
ASSERT_TRUE(LoadNativeBridge(kNativeBridgeLibrary, nullptr));
-#ifndef __APPLE__ // Mac OS does not support bind-mount.
-#ifndef HAVE_ANDROID_OS // Cannot write into the hard-wired location.
+#if !defined(__APPLE__) // Mac OS does not support bind-mount.
+#if !defined(__ANDROID__) // Cannot write into the hard-wired location.
// Try to create our mount namespace.
if (unshare(CLONE_NEWNS) != -1) {
// Create a dummy file.