Browse Source

crypto: cast uv_thread_t to unsigned long

Should work in all platforms and it fixes this compilation problem
on OSX:

../src/node_crypto.cc:154:3: error: no matching function for call to
'CRYPTO_THREADID_set_numeric'
  CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../deps/openssl/openssl/include/openssl/../../crypto/crypto.h:435:6:
    note: candidate function not viable: no known conversion from
          'uv_thread_t' (aka '_opaque_pthread_t *') to 'unsigned long'
          for 2nd argument
          void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned
          long val);
               ^
               1 error generated.

PR-URL: https://github.com/joyent/node/pull/8785
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
v0.11.15-release
Saúl Ibarra Corretgé 10 years ago
committed by Trevor Norris
parent
commit
0308ad2ce5
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -151,7 +151,7 @@ template int SSLWrap<TLSCallbacks>::TLSExtStatusCallback(SSL* s, void* arg);
static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
CRYPTO_THREADID_set_numeric(tid, (unsigned long) uv_thread_self());
}

Loading…
Cancel
Save