Skip to content
Snippets Groups Projects
Commit 8774a8fb authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

thread-safe crypto: cast thread identifiers to pointers

Use pointer-based thread identifiers instead of number-based ones. This
should resolve compilation warnings on BSD systems.

Linux uses integers as thread identifiers, BSD based systems use pointers.

ref #157
parent 341680b0
Branches
Tags
No related merge requests found
......@@ -104,7 +104,7 @@ static void openssl_mutexes_destroy(void)
static void openssl_threadid_cb(CRYPTO_THREADID *openssl_id)
{
pthread_t id = pthread_self();
CRYPTO_THREADID_set_numeric(openssl_id, id);
CRYPTO_THREADID_set_pointer(openssl_id, (void *)id);
}
/*- public API --------------------------------------------------------------*/
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment