Add lazy ftpl_init() to pthread_cond_init_232(), fixes #245.

This commit is contained in:
Steffen Dettmer
2020-04-08 19:57:14 +02:00
parent 04e78e67bf
commit c5b5d0b56e

View File

@@ -3209,6 +3209,17 @@ int pthread_cond_init_232(pthread_cond_t *restrict cond, const pthread_condattr_
clockid_t clock_id;
int result;
if (!initialized)
{
ftpl_init();
}
if (NULL == real_pthread_cond_init_232)
{ /* dlsym() failed */
#ifdef DEBUG
(void) fprintf(stderr, "faketime problem: original pthread_cond_init (@@GLIBC_2.3.2, fallback) not found.\n");
#endif
return -1; /* propagate error to caller */
}
result = real_pthread_cond_init_232(cond, attr);
if (result != 0 || attr == NULL)