diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcorehttp/examples/http_texture_load.cpp | 10 | ||||
-rwxr-xr-x | indra/llcorehttp/tests/llcorehttp_test.cpp | 12 | ||||
-rw-r--r-- | indra/llcrashlogger/llcrashlogger.cpp | 8 | ||||
-rw-r--r-- | indra/llcrashlogger/llcrashlogger.h | 7 |
4 files changed, 20 insertions, 17 deletions
diff --git a/indra/llcorehttp/examples/http_texture_load.cpp b/indra/llcorehttp/examples/http_texture_load.cpp index b91aaf0593..f80e64c965 100644 --- a/indra/llcorehttp/examples/http_texture_load.cpp +++ b/indra/llcorehttp/examples/http_texture_load.cpp @@ -52,7 +52,7 @@ void init_curl(); void term_curl(); -unsigned long ssl_thread_id_callback(void); +void ssl_thread_id_callback(CRYPTO_THREADID*); void ssl_locking_callback(int mode, int type, const char * file, int line); void usage(std::ostream & out); @@ -624,7 +624,7 @@ void init_curl() } CRYPTO_set_locking_callback(ssl_locking_callback); - CRYPTO_set_id_callback(ssl_thread_id_callback); + CRYPTO_THREADID_set_callback(ssl_thread_id_callback); } } @@ -640,12 +640,12 @@ void term_curl() } -unsigned long ssl_thread_id_callback(void) +void ssl_thread_id_callback(CRYPTO_THREADID* pthreadid) { #if defined(WIN32) - return (unsigned long) GetCurrentThread(); + CRYPTO_THREADID_set_pointer(pthreadid, GetCurrentThread()); #else - return (unsigned long) pthread_self(); + CRYPTO_THREADID_set_numeric(pthreadid, pthread_self()); #endif } diff --git a/indra/llcorehttp/tests/llcorehttp_test.cpp b/indra/llcorehttp/tests/llcorehttp_test.cpp index a310fc0508..d2df15ed5f 100755 --- a/indra/llcorehttp/tests/llcorehttp_test.cpp +++ b/indra/llcorehttp/tests/llcorehttp_test.cpp @@ -48,7 +48,7 @@ #include "llproxy.h" #include "llcleanup.h" -unsigned long ssl_thread_id_callback(void); +void ssl_thread_id_callback(CRYPTO_THREADID*); void ssl_locking_callback(int mode, int type, const char * file, int line); #if 0 // lltut provides main and runner @@ -93,7 +93,7 @@ void init_curl() } CRYPTO_set_locking_callback(ssl_locking_callback); - CRYPTO_set_id_callback(ssl_thread_id_callback); + CRYPTO_THREADID_set_callback(ssl_thread_id_callback); } LLProxy::getInstance(); @@ -113,12 +113,12 @@ void term_curl() } -unsigned long ssl_thread_id_callback(void) +void ssl_thread_id_callback(CRYPTO_THREADID* pthreadid) { #if defined(WIN32) - return (unsigned long) GetCurrentThread(); + CRYPTO_THREADID_set_pointer(pthreadid, GetCurrentThread()); #else - return (unsigned long) pthread_self(); + CRYPTO_THREADID_set_numeric(pthreadid, pthread_self()); #endif } @@ -172,5 +172,3 @@ void stop_thread(LLCore::HttpRequest * req) } } } - - diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 5e74715500..be7a08ac41 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -642,7 +642,7 @@ void LLCrashLogger::init_curl() } CRYPTO_set_locking_callback(ssl_locking_callback); - CRYPTO_set_id_callback(ssl_thread_id_callback); + CRYPTO_THREADID_set_callback(ssl_thread_id_callback); } } @@ -658,12 +658,12 @@ void LLCrashLogger::term_curl() } -unsigned long LLCrashLogger::ssl_thread_id_callback(void) +void LLCrashLogger::ssl_thread_id_callback(CRYPTO_THREADID* pthreadid) { #if LL_WINDOWS - return (unsigned long)GetCurrentThread(); + CRYPTO_THREADID_set_pointer(pthreadid, GetCurrentThread()); #else - return (unsigned long)pthread_self(); + CRYPTO_THREADID_set_numeric(pthreadid, pthread_self()); #endif } diff --git a/indra/llcrashlogger/llcrashlogger.h b/indra/llcrashlogger/llcrashlogger.h index 56e26c23ba..e3e8110a47 100644 --- a/indra/llcrashlogger/llcrashlogger.h +++ b/indra/llcrashlogger/llcrashlogger.h @@ -36,6 +36,11 @@ #include "llcrashlock.h" #include "_mutex.h" +// We shouldn't have to know the exact declaration of CRYPTO_THREADID, but VS +// 2017 complains if we forward-declare it as simply 'struct CRYPTO_THREADID'. +struct crypto_threadid_st; +typedef crypto_threadid_st CRYPTO_THREADID; + // Crash reporter behavior const S32 CRASH_BEHAVIOR_ASK = 0; const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; @@ -68,7 +73,7 @@ public: protected: static void init_curl(); static void term_curl(); - static unsigned long ssl_thread_id_callback(void); + static void ssl_thread_id_callback(CRYPTO_THREADID*); static void ssl_locking_callback(int mode, int type, const char * file, int line); S32 mCrashBehavior; |