Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bnoordhuis committed Sep 2, 2012
1 parent 298f6bf commit 870307d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Expand Up @@ -96,7 +96,7 @@ static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
#ifdef _WIN32
val = static_cast<unsigned long>(GetCurrentThreadId());
#else
val = static_cast<unsigned long>(pthread_self());
val = (unsigned long) pthread_self();
#endif

CRYPTO_THREADID_set_numeric(tid, val);
Expand Down

0 comments on commit 870307d

Please sign in to comment.