event_debug_created_threadable_ctx_: fix compilation without debug mode

The following command failed before:
$ ./configure --disable-debug-mode

Fixes: dcfb19a27b7760299bc9e7291c9abd88c59fd91a ("Debug mode option to error on
evthread init AFTER other event calls.")
This commit is contained in:
Azat Khuzhin 2015-09-29 20:36:39 +03:00
parent 3f749e93db
commit a068f2e594

View File

@ -201,6 +201,7 @@ eq_debug_entry(const struct event_debug_entry *a,
int event_debug_mode_on_ = 0;
#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
/**
* @brief debug mode variable which is set for any function/structure that needs
* to be shared across threads (if thread support is enabled).
@ -212,6 +213,7 @@ int event_debug_mode_on_ = 0;
* See: "Locks and threading" in the documentation.
*/
int event_debug_created_threadable_ctx_ = 0;
#endif
/* Set if it's too late to enable event_debug_mode. */
static int event_debug_mode_too_late = 0;
@ -669,9 +671,11 @@ event_base_new_with_config(const struct event_config *cfg)
/* prepare for threading */
#ifndef EVENT__DISABLE_THREAD_SUPPORT
#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
event_debug_created_threadable_ctx_ = 1;
#endif
#ifndef EVENT__DISABLE_DEBUG_MODE
if (EVTHREAD_LOCKING_ENABLED() &&
(!cfg || !(cfg->flags & EVENT_BASE_FLAG_NOLOCK))) {
int r;