summaryrefslogtreecommitdiffstats
path: root/libcutils/process_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcutils/process_name.c')
-rw-r--r--libcutils/process_name.c6
1 files changed, 6 insertions, 0 deletions
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) {