about summary refs log tree commit diff
path: root/src/thread/pthread_key_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_key_create.c')
-rw-r--r--src/thread/pthread_key_create.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_key_create.c b/src/thread/pthread_key_create.c
index efc38046..52c09734 100644
--- a/src/thread/pthread_key_create.c
+++ b/src/thread/pthread_key_create.c
@@ -12,6 +12,7 @@ int pthread_key_create(pthread_key_t *k, void (*dtor)(void *))
 	int i = (uintptr_t)&k / 16 % PTHREAD_KEYS_MAX;
 	int j = i;
 
+	pthread_self();
 	libc.tsd_keys = keys;
 	if (!dtor) dtor = nodtor;
 	/* Cheap trick - &k cannot match any destructor pointer */