Browse Source

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.
v0.9.2-release
Ben Noordhuis 12 years ago
parent
commit
870307de75
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -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);

Loading…
Cancel
Save