summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 4c52229120..d7e215b4c2 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -1000,7 +1000,7 @@ void SetThreadName(const char* thread_name) {
} else {
s = thread_name + len - 15;
}
-#if defined(HAVE_ANDROID_PTHREAD_SETNAME_NP)
+#if defined(__BIONIC__)
// pthread_setname_np fails rather than truncating long strings.
char buf[16]; // MAX_TASK_COMM_LEN=16 is hard-coded into bionic
strncpy(buf, s, sizeof(buf)-1);