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.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libcutils/process_name.c b/libcutils/process_name.c
index a6ab951..9c3dfb8 100644
--- a/libcutils/process_name.c
+++ b/libcutils/process_name.c
@@ -14,25 +14,27 @@
* limitations under the License.
*/
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <cutils/process_name.h>
-#ifdef HAVE_ANDROID_OS
-#include <cutils/properties.h>
+#if defined(HAVE_PRCTL)
+#include <sys/prctl.h>
#endif
-#include <unistd.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
-#if defined(HAVE_PRCTL)
-#include <sys/prctl.h>
+#include <cutils/process_name.h>
+#ifdef HAVE_ANDROID_OS
+#include <cutils/properties.h>
#endif
#define PROCESS_NAME_DEVICE "/sys/qemu_trace/process_name"
static const char* process_name = "unknown";
+#ifdef HAVE_ANDROID_OS
static int running_in_emulator = -1;
+#endif
void set_process_name(const char* new_name) {
#ifdef HAVE_ANDROID_OS