Skip to content

Commit 0308ad2

Browse files
saghultrevnorris
authored andcommitted
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: nodejs/node-v0.x-archive#8785 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
1 parent 69904c8 commit 0308ad2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/node_crypto.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ template int SSLWrap<TLSCallbacks>::TLSExtStatusCallback(SSL* s, void* arg);
151151

152152

153153
static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
154-
CRYPTO_THREADID_set_numeric(tid, uv_thread_self());
154+
CRYPTO_THREADID_set_numeric(tid, (unsigned long) uv_thread_self());
155155
}
156156

157157

0 commit comments

Comments
 (0)