Make uselocale(3) claim its pthread key in an ELF constructor.
pthread_once is nice for decoupling, but it makes resource availability less
predictable, which is a bad thing.
This fixes a test failure if uselocale(3) is called before
pthread.pthread_key_create_lots runs.
Change-Id: Ie2634f986a50e7965582d4bd6e5aaf48cf0d55c8
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index a42a8ab..d0a0201 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -80,7 +80,7 @@
* pthread_key_create; grep for GLOBAL_INIT_THREAD_LOCAL_BUFFER to find those. We need to manually
* maintain that second number, but pthread_test will fail if we forget.
*/
-#define GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT 4
+#define GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT 5
#define BIONIC_ALIGN(x, a) (((x) + (a - 1)) & ~(a - 1))