Use pthread_setname_np when available.
Switch from HAVE_PTHREAD_SETNAME_NP to HAVE_ANDROID_PTHREAD_SETNAME_NP.
The change to favor it over prctl() already went in (external change
https://review.source.android.com/#change,15205 ).
Change-Id: I3804b4c9d828d7a125cc4f0c8030e5832b5aeaf4
diff --git a/vm/Thread.c b/vm/Thread.c
index 56cafb4..389021f 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -1351,7 +1351,7 @@
} else {
s = threadName + len - 15;
}
-#if defined(HAVE_PTHREAD_SETNAME_NP)
+#if defined(HAVE_ANDROID_PTHREAD_SETNAME_NP)
if (pthread_setname_np(pthread_self(), s) != 0)
LOGW("Unable to set the name of the current thread\n");
#elif defined(HAVE_PRCTL)