summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-05-23 09:54:47 -0700
committerNick Kralevich <nnk@google.com>2013-05-23 11:04:54 -0700
commitb39e3a8a4fa9b4121a9ceb45cacce843b32b1a65 (patch)
tree189a3ec225b4fc742ad5eb2d9c1920fa71777b0d
parent893a4a47e8c9290128b9254af0246e36f821c260 (diff)
downloadsystem_core-b39e3a8a4fa9b4121a9ceb45cacce843b32b1a65.zip
system_core-b39e3a8a4fa9b4121a9ceb45cacce843b32b1a65.tar.gz
system_core-b39e3a8a4fa9b4121a9ceb45cacce843b32b1a65.tar.bz2
libcutils: Don't build host property support
Only build property support for the device, not for the host. Host side property support is being removed, as it was only really used for the simulator. process_name.c: When building this for the host, don't reference properties. Change-Id: Idcea5ad52a85e47eef17a381cb0601657efbdf13
-rw-r--r--libcutils/Android.mk2
-rw-r--r--libcutils/process_name.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk
index afbc758..1c3185e 100644
--- a/libcutils/Android.mk
+++ b/libcutils/Android.mk
@@ -42,7 +42,6 @@ commonSources := \
strdup16to8.c \
strdup8to16.c \
process_name.c \
- properties.c \
threads.c \
sched_policy.c \
iosched_policy.c \
@@ -112,6 +111,7 @@ LOCAL_SRC_FILES := $(commonSources) \
debugger.c \
klog.c \
partition_utils.c \
+ properties.c \
qtaguid.c \
trace.c \
uevent.c
diff --git a/libcutils/process_name.c b/libcutils/process_name.c
index bda9d08..a6ab951 100644
--- a/libcutils/process_name.c
+++ b/libcutils/process_name.c
@@ -17,7 +17,9 @@
#include <stdlib.h>
#include <string.h>
#include <cutils/process_name.h>
+#ifdef HAVE_ANDROID_OS
#include <cutils/properties.h>
+#endif
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -33,7 +35,9 @@ static const char* process_name = "unknown";
static int running_in_emulator = -1;
void set_process_name(const char* new_name) {
+#ifdef HAVE_ANDROID_OS
char propBuf[PROPERTY_VALUE_MAX];
+#endif
if (new_name == NULL) {
return;
@@ -53,6 +57,7 @@ void set_process_name(const char* new_name) {
}
#endif
+#ifdef HAVE_ANDROID_OS
// If we know we are not running in the emulator, then return.
if (running_in_emulator == 0) {
return;
@@ -82,6 +87,7 @@ void set_process_name(const char* new_name) {
return;
write(fd, process_name, strlen(process_name) + 1);
close(fd);
+#endif
}
const char* get_process_name(void) {