diff src/http/ngx_http_core_module.h @ 6733:adc2414856b1

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 10 Oct 2016 18:44:17 +0300
parents 48bab8b83f4e
children e38e9c50a40e
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -15,6 +15,8 @@
 
 #if (NGX_THREADS)
 #include <ngx_thread_pool.h>
+#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