From 292ccd3c181d7e005561c4a009b1f6b411e56179 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 15 Dec 2014 12:52:53 -0800 Subject: [PATCH] Fix references to HAVE_PRCTL. Change-Id: I8343b398f2ce0d743487fdd086e67763c7dd67f1 --- libcutils/process_name.c | 4 ++-- libutils/Threads.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libcutils/process_name.c b/libcutils/process_name.c index 9c3dfb8d2..cc931ebaf 100644 --- a/libcutils/process_name.c +++ b/libcutils/process_name.c @@ -17,7 +17,7 @@ #include #include #include -#if defined(HAVE_PRCTL) +#if defined(__linux__) #include #endif #include @@ -51,7 +51,7 @@ void set_process_name(const char* new_name) { strcpy(copy, new_name); process_name = (const char*) copy; -#if defined(HAVE_PRCTL) +#if defined(__linux__) if (len < 16) { prctl(PR_SET_NAME, (unsigned long) new_name, 0, 0, 0); } else { diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp index 9bcd06330..b2c690397 100644 --- a/libutils/Threads.cpp +++ b/libutils/Threads.cpp @@ -35,7 +35,7 @@ # define HAVE_CREATETHREAD // Cygwin, vs. HAVE__BEGINTHREADEX for MinGW #endif -#if defined(HAVE_PRCTL) +#if defined(__linux__) #include #endif @@ -100,7 +100,7 @@ struct thread_data_t { }; void androidSetThreadName(const char* name) { -#if defined(HAVE_PRCTL) +#if defined(__linux__) // Mac OS doesn't have this, and we build libutil for the host too int hasAt = 0; int hasDot = 0;