chunk: Don't depend on pthread directly

This commit is contained in:
Martin Willi
2014-06-04 15:53:00 +02:00
parent f1c9653e04
commit c46cee6f6d
3 changed files with 22 additions and 13 deletions
+9
View File
@@ -242,6 +242,7 @@ bool library_init(char *settings, const char *namespace)
{
private_library_t *this;
printf_hook_t *pfh;
static bool seeded = FALSE;
if (lib)
{ /* already initialized, increase refcount */
@@ -250,6 +251,14 @@ bool library_init(char *settings, const char *namespace)
return !this->integrity_failed;
}
if (!seeded)
{
/* we do this just once to allow hash table lifetimes longer than
* one init/deinit cycle. */
seeded = TRUE;
chunk_hash_seed();
}
INIT(this,
.public = {
.get = _get,