From c6019867a710e484ca4a46033caf636cac31d0cb Mon Sep 17 00:00:00 2001 From: Yuji Yamano Date: Fri, 15 Jul 2022 01:43:38 +0000 Subject: [PATCH] Add missing nginx headers to follow nginx's way. Fixed #495 See http://nginx.org/en/docs/dev/development_guide.html#include_files for more details. --- src/http/ngx_http_mruby_async.h | 1 + src/http/ngx_http_mruby_connection.h | 4 ++++ src/http/ngx_http_mruby_core.h | 1 + src/http/ngx_http_mruby_filter.h | 4 ++++ src/http/ngx_http_mruby_init.h | 1 + src/http/ngx_http_mruby_request.h | 1 + src/http/ngx_http_mruby_server.h | 4 ++++ src/http/ngx_http_mruby_ssl.h | 2 ++ src/http/ngx_http_mruby_upstream.h | 7 ++++--- src/http/ngx_http_mruby_var.h | 1 + src/stream/ngx_stream_mruby_async.h | 1 + src/stream/ngx_stream_mruby_connection.h | 4 ++++ src/stream/ngx_stream_mruby_core.h | 1 + src/stream/ngx_stream_mruby_init.h | 1 + src/stream/ngx_stream_mruby_module.h | 2 +- 15 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/http/ngx_http_mruby_async.h b/src/http/ngx_http_mruby_async.h index 3632d6fa..a00f6212 100644 --- a/src/http/ngx_http_mruby_async.h +++ b/src/http/ngx_http_mruby_async.h @@ -8,6 +8,7 @@ #define NGX_HTTP_MRUBY_ASYNC_H #include +#include #include #include diff --git a/src/http/ngx_http_mruby_connection.h b/src/http/ngx_http_mruby_connection.h index e5f78cfa..845b36b5 100644 --- a/src/http/ngx_http_mruby_connection.h +++ b/src/http/ngx_http_mruby_connection.h @@ -7,6 +7,10 @@ #ifndef NGX_HTTP_MRUBY_CONNECTION_H #define NGX_HTTP_MRUBY_CONNECTION_H +#include +#include +#include + #include void ngx_mrb_conn_class_init(mrb_state *mrb, struct RClass *class); diff --git a/src/http/ngx_http_mruby_core.h b/src/http/ngx_http_mruby_core.h index e08bc1ee..0ac98e4d 100644 --- a/src/http/ngx_http_mruby_core.h +++ b/src/http/ngx_http_mruby_core.h @@ -8,6 +8,7 @@ #define NGX_HTTP_MRUBY_CORE_H #include +#include #include #include diff --git a/src/http/ngx_http_mruby_filter.h b/src/http/ngx_http_mruby_filter.h index d8a13f72..fecda7b4 100644 --- a/src/http/ngx_http_mruby_filter.h +++ b/src/http/ngx_http_mruby_filter.h @@ -7,6 +7,10 @@ #ifndef NGX_HTTP_MRUBY_FILTER_H #define NGX_HTTP_MRUBY_FILTER_H +#include +#include +#include + #include void ngx_mrb_filter_class_init(mrb_state *mrb, struct RClass *class); diff --git a/src/http/ngx_http_mruby_init.h b/src/http/ngx_http_mruby_init.h index d0455d87..76ed0fd9 100644 --- a/src/http/ngx_http_mruby_init.h +++ b/src/http/ngx_http_mruby_init.h @@ -8,6 +8,7 @@ #define NGX_HTTP_MRUBY_INIT_H #include +#include #include #include diff --git a/src/http/ngx_http_mruby_request.h b/src/http/ngx_http_mruby_request.h index 83b160a6..33a34a81 100644 --- a/src/http/ngx_http_mruby_request.h +++ b/src/http/ngx_http_mruby_request.h @@ -8,6 +8,7 @@ #define NGX_HTTP_MRUBY_REQUEST_H #include +#include #include #include diff --git a/src/http/ngx_http_mruby_server.h b/src/http/ngx_http_mruby_server.h index 020b09eb..d770eee9 100644 --- a/src/http/ngx_http_mruby_server.h +++ b/src/http/ngx_http_mruby_server.h @@ -7,6 +7,10 @@ #ifndef NGX_HTTP_MRUBY_SERVER_H #define NGX_HTTP_MRUBY_SERVER_H +#include +#include +#include + #include void ngx_mrb_server_class_init(mrb_state *mrb, struct RClass *class); diff --git a/src/http/ngx_http_mruby_ssl.h b/src/http/ngx_http_mruby_ssl.h index cfeff5d2..4aaf6258 100644 --- a/src/http/ngx_http_mruby_ssl.h +++ b/src/http/ngx_http_mruby_ssl.h @@ -8,6 +8,8 @@ #define NGX_HTTP_MRUBY_SSL_H #include +#include +#include #if (NGX_HTTP_SSL) diff --git a/src/http/ngx_http_mruby_upstream.h b/src/http/ngx_http_mruby_upstream.h index 13131b77..9cd01c7b 100644 --- a/src/http/ngx_http_mruby_upstream.h +++ b/src/http/ngx_http_mruby_upstream.h @@ -7,7 +7,10 @@ #ifndef NGX_HTTP_MRUBY_UPSTREAM_H #define NGX_HTTP_MRUBY_UPSTREAM_H -#include +#include +#include +#include + #if (nginx_version > 1007999) #define NGX_USE_MRUBY_UPSTREAM #endif @@ -20,8 +23,6 @@ void ngx_mrb_upstream_class_init(mrb_state *mrb, struct RClass *class); #ifdef NGX_HTTP_MRUBY_UPSTREAM_C -#include - /* reference from src/http/modules/ngx_http_upstream_keepalive_module.c */ /* diff --git a/src/http/ngx_http_mruby_var.h b/src/http/ngx_http_mruby_var.h index 452aecf0..e229392f 100644 --- a/src/http/ngx_http_mruby_var.h +++ b/src/http/ngx_http_mruby_var.h @@ -8,6 +8,7 @@ #define NGX_HTTP_MRUBY_VAR_H #include +#include #include #include diff --git a/src/stream/ngx_stream_mruby_async.h b/src/stream/ngx_stream_mruby_async.h index 64753cff..354f1c51 100644 --- a/src/stream/ngx_stream_mruby_async.h +++ b/src/stream/ngx_stream_mruby_async.h @@ -8,6 +8,7 @@ #define NGX_STREAM_MRUBY_ASYNC_H #include +#include #include #include diff --git a/src/stream/ngx_stream_mruby_connection.h b/src/stream/ngx_stream_mruby_connection.h index 668eda27..64a730e2 100644 --- a/src/stream/ngx_stream_mruby_connection.h +++ b/src/stream/ngx_stream_mruby_connection.h @@ -7,6 +7,10 @@ #ifndef NGX_STREAM_MRUBY_CONNECTION_H #define NGX_STREAM_MRUBY_CONNECTION_H +#include +#include +#include + #include void ngx_stream_mrb_conn_class_init(mrb_state *mrb, struct RClass *class); diff --git a/src/stream/ngx_stream_mruby_core.h b/src/stream/ngx_stream_mruby_core.h index 03113225..3c621ca8 100644 --- a/src/stream/ngx_stream_mruby_core.h +++ b/src/stream/ngx_stream_mruby_core.h @@ -8,6 +8,7 @@ #define NGX_STREAM_MRUBY_CORE_H #include +#include #include #include diff --git a/src/stream/ngx_stream_mruby_init.h b/src/stream/ngx_stream_mruby_init.h index f600ccd1..853d54a0 100644 --- a/src/stream/ngx_stream_mruby_init.h +++ b/src/stream/ngx_stream_mruby_init.h @@ -9,6 +9,7 @@ #include #include +#include #include diff --git a/src/stream/ngx_stream_mruby_module.h b/src/stream/ngx_stream_mruby_module.h index eeb26e1e..62de81ee 100644 --- a/src/stream/ngx_stream_mruby_module.h +++ b/src/stream/ngx_stream_mruby_module.h @@ -7,7 +7,7 @@ #ifndef NGX_STREAM_MRUBY_MODULE_H #define NGX_STREAM_MRUBY_MODULE_H -#include +#include #include #include