OSDN Git Service

comment out hte multiuser stuff that is breaking regular ndk builds
authorKoushik Dutta <koushd@gmail.com>
Thu, 7 Nov 2013 21:53:39 +0000 (13:53 -0800)
committerKoushik Dutta <koushd@gmail.com>
Thu, 7 Nov 2013 21:53:39 +0000 (13:53 -0800)
Change-Id: I535472084833883e5bedb1631dcb309b6d9e77a3

Superuser/jni/su/daemon.c

index 0042d24..38b20ed 100644 (file)
 #include <pthread.h>
 #include <sched.h>
 #include <termios.h>
+
+#ifdef SUPERUSER_EMBEDEDED
 #include <cutils/multiuser.h>
+#endif
 
 #include "su.h"
 #include "utils.h"
@@ -95,6 +98,7 @@ static void write_string(int fd, char* val) {
     }
 }
 
+#ifdef SUPERUSER_EMBEDDED
 static void mount_emulated_storage(int user_id) {
     const char *emulated_source = getenv("EMULATED_STORAGE_SOURCE");
     const char *emulated_target = getenv("EMULATED_STORAGE_TARGET");
@@ -129,6 +133,7 @@ static void mount_emulated_storage(int user_id) {
         PLOGE("mount legacy path");
     }
 }
+#endif
 
 static int run_daemon_child(int infd, int outfd, int errfd, int argc, char** argv) {
     if (-1 == dup2(outfd, STDOUT_FILENO)) {
@@ -331,9 +336,11 @@ static int daemon_accept(int fd) {
             outfd = pts;
         }
 
+#ifdef SUPERUSER_EMBEDEDED
         if (mount_storage) {
             mount_emulated_storage(multiuser_get_user_id(daemon_from_uid));
         }
+#endif
 
         return run_daemon_child(infd, outfd, errfd, argc, argv);
     }