diff --git a/indra/llmessage/aicurl.cpp b/indra/llmessage/aicurl.cpp index 9dda7bf5f..d079711d1 100644 --- a/indra/llmessage/aicurl.cpp +++ b/indra/llmessage/aicurl.cpp @@ -123,20 +123,13 @@ void ssl_locking_function(int mode, int n, char const* file, int line) } } -#if LL_WINDOWS -static unsigned long __cdecl apr_os_thread_current_wrapper() -{ - return (unsigned long)apr_os_thread_current(); -} -#endif - #if HAVE_CRYPTO_THREADID // OpenSSL uniq id function. void ssl_id_function(CRYPTO_THREADID* thread_id) { -#if LL_WINDOWS // apr_os_thread_current() returns an unsigned long. +#if LL_WINDOWS // apr_os_thread_current() returns a pointer, CRYPTO_THREADID_set_pointer(thread_id, apr_os_thread_current()); -#else // if it would return a pointer. +#else // else it returns an unsigned long. CRYPTO_THREADID_set_numeric(thread_id, apr_os_thread_current()); #endif } @@ -193,6 +186,13 @@ ssl_dyn_create_function_type old_ssl_dyn_create_function; ssl_dyn_destroy_function_type old_ssl_dyn_destroy_function; ssl_dyn_lock_function_type old_ssl_dyn_lock_function; +#if LL_WINDOWS +static unsigned long __cdecl apr_os_thread_current_wrapper() +{ + return (unsigned long)apr_os_thread_current(); +} +#endif + // Set for openssl-1.0.1...1.0.1c. static bool need_renegotiation_hack = false;