ART: Fix mac build
Change-Id: I5821cf4d5b8f4142912c9cd3524a6aaa4b4a397c
diff --git a/runtime/native_bridge_art_interface.cc b/runtime/native_bridge_art_interface.cc
index fcd11ed..cc44615 100644
--- a/runtime/native_bridge_art_interface.cc
+++ b/runtime/native_bridge_art_interface.cc
@@ -115,11 +115,13 @@
void PreInitializeNativeBridge(std::string dir) {
VLOG(startup) << "Runtime::Pre-initialize native bridge";
+#ifndef __APPLE__ // Mac OS does not support CLONE_NEWNS.
if (unshare(CLONE_NEWNS) == -1) {
LOG(WARNING) << "Could not create mount namespace.";
return;
}
android::PreInitializeNativeBridge(dir.c_str(), GetInstructionSetString(kRuntimeISA));
+#endif
}
void InitializeNativeBridge(JNIEnv* env, const char* instruction_set) {