summaryrefslogtreecommitdiff
path: root/indra/llcrashlogger
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-07-23 19:21:30 +0000
committerDave Houlton <euclid@lindenlab.com>2020-07-23 19:21:30 +0000
commit6fbf39f9b319106e39f80b8641acaba122d02e0a (patch)
treee47af1ff1bd1db52fd93c11d857b11387bacf01a /indra/llcrashlogger
parent05200cf827d9a6263adc4905bf41a4905bce2659 (diff)
parent64a9ad0f5f52dac633a76e39335a7def2573b82e (diff)
Merged in lmr4-merge-6.4.6 (pull request #213)
Merge master v6.4.6 into DRTVWR-497 (VS2017)
Diffstat (limited to 'indra/llcrashlogger')
-rw-r--r--indra/llcrashlogger/llcrashlogger.cpp8
-rw-r--r--indra/llcrashlogger/llcrashlogger.h7
2 files changed, 10 insertions, 5 deletions
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index 5e74715500..62fcdaf545 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_pointer(pthreadid, reinterpret_cast<void*>(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;