From 4618788c4a4b85b9c733e62673c16e6ba7d0a4d3 Mon Sep 17 00:00:00 2001 From: zll600 <3400692417@qq.com> Date: Mon, 29 Jan 2024 23:05:33 +0800 Subject: [PATCH 1/4] fix: change the order of header files --- src/http/ngx_http_wasm_api.c | 5 +++++ src/http/ngx_http_wasm_api.h | 2 +- src/http/ngx_http_wasm_api_wasmedge.h | 4 +++- src/http/ngx_http_wasm_call.h | 3 ++- src/http/ngx_http_wasm_ctx.h | 2 +- src/http/ngx_http_wasm_module.h | 2 +- src/http/ngx_http_wasm_state.h | 2 +- src/proxy_wasm/proxy_wasm_map.h | 4 +++- src/proxy_wasm/proxy_wasm_memory.h | 1 + src/proxy_wasm/proxy_wasm_types.h | 2 +- src/vm/vm.h | 3 ++- 11 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/http/ngx_http_wasm_api.c b/src/http/ngx_http_wasm_api.c index 75bd66e..99bf9f4 100644 --- a/src/http/ngx_http_wasm_api.c +++ b/src/http/ngx_http_wasm_api.c @@ -15,6 +15,11 @@ * */ #define _GNU_SOURCE /* for RTLD_DEFAULT */ + +#include +#include + + #include #include "vm/vm.h" #include "ngx_http_wasm_api.h" diff --git a/src/http/ngx_http_wasm_api.h b/src/http/ngx_http_wasm_api.h index 56657b9..9d5e626 100644 --- a/src/http/ngx_http_wasm_api.h +++ b/src/http/ngx_http_wasm_api.h @@ -17,7 +17,7 @@ #ifndef NGX_HTTP_WASM_API_H #define NGX_HTTP_WASM_API_H - +#include #include diff --git a/src/http/ngx_http_wasm_api_wasmedge.h b/src/http/ngx_http_wasm_api_wasmedge.h index 03a34a7..7cc2a4b 100644 --- a/src/http/ngx_http_wasm_api_wasmedge.h +++ b/src/http/ngx_http_wasm_api_wasmedge.h @@ -19,10 +19,12 @@ #ifndef NGX_HTTP_WASM_API_WASMEDGE_H #define NGX_HTTP_WASM_API_WASMEDGE_H +#include +#include #include #include -#include + #include "proxy_wasm/proxy_wasm_types.h" #include "http/ngx_http_wasm_api_def.h" diff --git a/src/http/ngx_http_wasm_call.h b/src/http/ngx_http_wasm_call.h index ffe9e69..60671df 100644 --- a/src/http/ngx_http_wasm_call.h +++ b/src/http/ngx_http_wasm_call.h @@ -17,7 +17,8 @@ #ifndef NGX_HTTP_WASM_CALL_H #define NGX_HTTP_WASM_CALL_H - +#include +#include #include diff --git a/src/http/ngx_http_wasm_ctx.h b/src/http/ngx_http_wasm_ctx.h index 54d2b7c..d412d13 100644 --- a/src/http/ngx_http_wasm_ctx.h +++ b/src/http/ngx_http_wasm_ctx.h @@ -17,7 +17,7 @@ #ifndef NGX_HTTP_WASM_CTX_H #define NGX_HTTP_WASM_CTX_H - +#include #include #include "ngx_http_wasm_state.h" #include "proxy_wasm/proxy_wasm_types.h" diff --git a/src/http/ngx_http_wasm_module.h b/src/http/ngx_http_wasm_module.h index 26c9a6a..e59ca47 100644 --- a/src/http/ngx_http_wasm_module.h +++ b/src/http/ngx_http_wasm_module.h @@ -17,7 +17,7 @@ #ifndef NGX_HTTP_WASM_MODULE_H #define NGX_HTTP_WASM_MODULE_H - +#include #include diff --git a/src/http/ngx_http_wasm_state.h b/src/http/ngx_http_wasm_state.h index e6bbf1e..1390b35 100644 --- a/src/http/ngx_http_wasm_state.h +++ b/src/http/ngx_http_wasm_state.h @@ -17,7 +17,7 @@ #ifndef NGX_HTTP_WASM_STATE_H #define NGX_HTTP_WASM_STATE_H - +#include #include #include diff --git a/src/proxy_wasm/proxy_wasm_map.h b/src/proxy_wasm/proxy_wasm_map.h index ccca738..b4e561f 100644 --- a/src/proxy_wasm/proxy_wasm_map.h +++ b/src/proxy_wasm/proxy_wasm_map.h @@ -16,8 +16,10 @@ */ #ifndef PROXY_WASM_MAP_H #define PROXY_WASM_MAP_H -#include + +#include #include +#include typedef enum { diff --git a/src/proxy_wasm/proxy_wasm_memory.h b/src/proxy_wasm/proxy_wasm_memory.h index 574f2b7..123105e 100644 --- a/src/proxy_wasm/proxy_wasm_memory.h +++ b/src/proxy_wasm/proxy_wasm_memory.h @@ -16,6 +16,7 @@ */ #ifndef PROXY_WASM_MEMORY_H #define PROXY_WASM_MEMORY_H +#include #include diff --git a/src/proxy_wasm/proxy_wasm_types.h b/src/proxy_wasm/proxy_wasm_types.h index 9222426..8946a1d 100644 --- a/src/proxy_wasm/proxy_wasm_types.h +++ b/src/proxy_wasm/proxy_wasm_types.h @@ -17,7 +17,7 @@ #ifndef PROXY_WASM_TYPES_H #define PROXY_WASM_TYPES_H - +#include #include #include diff --git a/src/vm/vm.h b/src/vm/vm.h index 789684b..5c12838 100644 --- a/src/vm/vm.h +++ b/src/vm/vm.h @@ -18,8 +18,9 @@ #define VM_H -#include +#include #include +#include #define NGX_WASM_PARAM_VOID 1 From 7b76ac05bf525d4c728b19686ec2ee2470bc13fd Mon Sep 17 00:00:00 2001 From: zll600 <3400692417@qq.com> Date: Mon, 29 Jan 2024 23:13:18 +0800 Subject: [PATCH 2/4] fix: change the order of header files --- src/http/ngx_http_wasm_api_def.h | 2 +- src/http/ngx_http_wasm_api_wasmtime.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http/ngx_http_wasm_api_def.h b/src/http/ngx_http_wasm_api_def.h index f97c02b..bc85c67 100644 --- a/src/http/ngx_http_wasm_api_def.h +++ b/src/http/ngx_http_wasm_api_def.h @@ -19,7 +19,7 @@ #ifndef NGX_HTTP_WASM_API_DEF_H #define NGX_HTTP_WASM_API_DEF_H - +#include #include diff --git a/src/http/ngx_http_wasm_api_wasmtime.h b/src/http/ngx_http_wasm_api_wasmtime.h index 7eb9495..8fae617 100644 --- a/src/http/ngx_http_wasm_api_wasmtime.h +++ b/src/http/ngx_http_wasm_api_wasmtime.h @@ -19,10 +19,11 @@ #ifndef NGX_HTTP_WASM_API_WASMTIME_H #define NGX_HTTP_WASM_API_WASMTIME_H +#include +#include #include #include -#include #include "proxy_wasm/proxy_wasm_types.h" #include "http/ngx_http_wasm_api_def.h" From ea5933fd73ef53499fc7808f6422963f9a4c45c8 Mon Sep 17 00:00:00 2001 From: zll600 <3400692417@qq.com> Date: Mon, 29 Jan 2024 23:26:42 +0800 Subject: [PATCH 3/4] fix: change the order of header files --- gen_wasm_host_api.py | 5 +++-- src/http/ngx_http_wasm_api_wasmedge.h | 3 +-- src/http/ngx_http_wasm_api_wasmtime.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gen_wasm_host_api.py b/gen_wasm_host_api.py index 5183a23..9d11634 100755 --- a/gen_wasm_host_api.py +++ b/gen_wasm_host_api.py @@ -43,7 +43,7 @@ #ifndef NGX_HTTP_WASM_API_DEF_H #define NGX_HTTP_WASM_API_DEF_H - +#include #include @@ -59,9 +59,10 @@ #define $vm_api_header_name +#include +#include #include $vm_header -#include #include "proxy_wasm/proxy_wasm_types.h" #include "http/ngx_http_wasm_api_def.h" diff --git a/src/http/ngx_http_wasm_api_wasmedge.h b/src/http/ngx_http_wasm_api_wasmedge.h index 7cc2a4b..4dce226 100644 --- a/src/http/ngx_http_wasm_api_wasmedge.h +++ b/src/http/ngx_http_wasm_api_wasmedge.h @@ -19,12 +19,11 @@ #ifndef NGX_HTTP_WASM_API_WASMEDGE_H #define NGX_HTTP_WASM_API_WASMEDGE_H + #include #include - #include #include - #include "proxy_wasm/proxy_wasm_types.h" #include "http/ngx_http_wasm_api_def.h" diff --git a/src/http/ngx_http_wasm_api_wasmtime.h b/src/http/ngx_http_wasm_api_wasmtime.h index 8fae617..b553485 100644 --- a/src/http/ngx_http_wasm_api_wasmtime.h +++ b/src/http/ngx_http_wasm_api_wasmtime.h @@ -19,9 +19,9 @@ #ifndef NGX_HTTP_WASM_API_WASMTIME_H #define NGX_HTTP_WASM_API_WASMTIME_H + #include #include - #include #include #include "proxy_wasm/proxy_wasm_types.h" From 0cae163f373e3f95f89df722d4363705df858408 Mon Sep 17 00:00:00 2001 From: zll600 <3400692417@qq.com> Date: Mon, 29 Jan 2024 23:30:02 +0800 Subject: [PATCH 4/4] fix: change the order of header files --- src/vm/wasmtime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vm/wasmtime.c b/src/vm/wasmtime.c index 08aa364..cbf41ea 100644 --- a/src/vm/wasmtime.c +++ b/src/vm/wasmtime.c @@ -14,6 +14,9 @@ * limitations under the License. * */ + +#include +#include #include #include #include