From 50228b35b6e8cd42f14ce12a973fec2d65d2d8db Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 28 Jun 2018 18:31:13 +0300 Subject: [PATCH] Removed usage of nxt_thread_context in loadable modules. This change allows to use __thread class storage on MacOSX. --- src/nxt_php_sapi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index f495364a..25324aad 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -175,6 +175,9 @@ NXT_EXPORT nxt_application_module_t nxt_app_module = { }; +static nxt_task_t *nxt_php_task; + + nxt_inline u_char * nxt_realpath(const void *c) { @@ -195,6 +198,8 @@ nxt_php_init(nxt_task_t *task, nxt_common_app_conf_t *conf) static nxt_str_t user_str = nxt_string("user"); static nxt_str_t admin_str = nxt_string("admin"); + nxt_php_task = task; + c = &conf->u.php; if (c->root == NULL) { @@ -866,5 +871,5 @@ static void nxt_php_log_message(char *message) #endif { - nxt_thread_log_error(NXT_LOG_NOTICE, "php message: %s", message); + nxt_log(nxt_php_task, NXT_LOG_NOTICE, "php message: %s", message); }