OSDN Git Service

ART: Fix mac build
authorAndreas Gampe <agampe@google.com>
Fri, 26 Sep 2014 06:13:47 +0000 (23:13 -0700)
committerAndreas Gampe <agampe@google.com>
Fri, 26 Sep 2014 07:16:53 +0000 (00:16 -0700)
Change-Id: I5821cf4d5b8f4142912c9cd3524a6aaa4b4a397c

runtime/native_bridge_art_interface.cc

index fcd11ed..cc44615 100644 (file)
@@ -115,11 +115,13 @@ void LoadNativeBridge(std::string& native_bridge_library_filename) {
 
 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) {