crypto: fix build error on OS X

pthread_t is a pointer type on OS X but an unsigned long on most other
platforms. Use a C style cast because reinterpret_cast nor static_cast
work in all cases.
pull/24504/head
Ben Noordhuis 2012-09-02 13:45:56 +02:00
parent 298f6bff5b
commit 870307de75
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
#ifdef _WIN32 #ifdef _WIN32
val = static_cast<unsigned long>(GetCurrentThreadId()); val = static_cast<unsigned long>(GetCurrentThreadId());
#else #else
val = static_cast<unsigned long>(pthread_self()); val = (unsigned long) pthread_self();
#endif #endif
CRYPTO_THREADID_set_numeric(tid, val); CRYPTO_THREADID_set_numeric(tid, val);