From 9f6e8673f40f7532bf3059bda41e05b545520dd3 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 10 Oct 2016 18:44:17 +0300 Subject: Modules compatibility: compatibility with NGX_THREADS. With this change it is now possible to load modules compiled without the "--with-threads" configure option into nginx binary compiled with it, and vice versa (if a module does not use thread-specific functions), assuming both use the "--with-compat" option. --- src/http/ngx_http_cache.h | 2 +- src/http/ngx_http_core_module.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/http') diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index 9c9ff6f65..70342d0ed 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h @@ -93,7 +93,7 @@ struct ngx_http_cache_s { ngx_http_file_cache_t *file_cache; ngx_http_file_cache_node_t *node; -#if (NGX_THREADS) +#if (NGX_THREADS || NGX_COMPAT) ngx_thread_task_t *thread_task; #endif diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 628679ff3..7140a6b7a 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h @@ -15,6 +15,8 @@ #if (NGX_THREADS) #include +#elif (NGX_COMPAT) +typedef struct ngx_thread_pool_s ngx_thread_pool_t; #endif @@ -409,7 +411,7 @@ struct ngx_http_core_loc_conf_s { #endif #endif -#if (NGX_THREADS) +#if (NGX_THREADS || NGX_COMPAT) ngx_thread_pool_t *thread_pool; ngx_http_complex_value_t *thread_pool_value; #endif -- cgit