Skip to content

Commit 0b4b31d

Browse files
authored
feat: update header files to support openresty-1.23.5.1 (#162)
1 parent ccc83f7 commit 0b4b31d

15 files changed

+29
-13
lines changed

gen_wasm_host_api.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#ifndef NGX_HTTP_WASM_API_DEF_H
4444
#define NGX_HTTP_WASM_API_DEF_H
4545
46-
46+
#include <ngx_config.h>
4747
#include <ngx_core.h>
4848
4949
@@ -59,9 +59,10 @@
5959
#define $vm_api_header_name
6060
6161
62+
#include <ngx_config.h>
63+
#include <ngx_core.h>
6264
#include <wasm.h>
6365
$vm_header
64-
#include <ngx_core.h>
6566
#include "proxy_wasm/proxy_wasm_types.h"
6667
#include "http/ngx_http_wasm_api_def.h"
6768

src/http/ngx_http_wasm_api.c

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
*
1616
*/
1717
#define _GNU_SOURCE /* for RTLD_DEFAULT */
18+
19+
#include <ngx_config.h>
20+
#include <ngx_core.h>
21+
22+
1823
#include <dlfcn.h>
1924
#include "vm/vm.h"
2025
#include "ngx_http_wasm_api.h"

src/http/ngx_http_wasm_api.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NGX_HTTP_WASM_API_H
1818
#define NGX_HTTP_WASM_API_H
1919

20-
20+
#include <ngx_config.h>
2121
#include <ngx_core.h>
2222

2323

src/http/ngx_http_wasm_api_def.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef NGX_HTTP_WASM_API_DEF_H
2020
#define NGX_HTTP_WASM_API_DEF_H
2121

22-
22+
#include <ngx_config.h>
2323
#include <ngx_core.h>
2424

2525

src/http/ngx_http_wasm_api_wasmedge.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
#define NGX_HTTP_WASM_API_WASMEDGE_H
2121

2222

23+
#include <ngx_config.h>
24+
#include <ngx_core.h>
2325
#include <wasm.h>
2426
#include <wasmedge/wasmedge.h>
25-
#include <ngx_core.h>
2627
#include "proxy_wasm/proxy_wasm_types.h"
2728
#include "http/ngx_http_wasm_api_def.h"
2829

src/http/ngx_http_wasm_api_wasmtime.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
#define NGX_HTTP_WASM_API_WASMTIME_H
2121

2222

23+
#include <ngx_config.h>
24+
#include <ngx_core.h>
2325
#include <wasm.h>
2426
#include <wasmtime.h>
25-
#include <ngx_core.h>
2627
#include "proxy_wasm/proxy_wasm_types.h"
2728
#include "http/ngx_http_wasm_api_def.h"
2829

src/http/ngx_http_wasm_call.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
#ifndef NGX_HTTP_WASM_CALL_H
1818
#define NGX_HTTP_WASM_CALL_H
1919

20-
20+
#include <ngx_config.h>
21+
#include <ngx_core.h>
2122
#include <ngx_http.h>
2223

2324

src/http/ngx_http_wasm_ctx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NGX_HTTP_WASM_CTX_H
1818
#define NGX_HTTP_WASM_CTX_H
1919

20-
20+
#include <ngx_config.h>
2121
#include <ngx_core.h>
2222
#include "ngx_http_wasm_state.h"
2323
#include "proxy_wasm/proxy_wasm_types.h"

src/http/ngx_http_wasm_module.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NGX_HTTP_WASM_MODULE_H
1818
#define NGX_HTTP_WASM_MODULE_H
1919

20-
20+
#include <ngx_config.h>
2121
#include <ngx_core.h>
2222

2323

src/http/ngx_http_wasm_state.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NGX_HTTP_WASM_STATE_H
1818
#define NGX_HTTP_WASM_STATE_H
1919

20-
20+
#include <ngx_config.h>
2121
#include <ngx_core.h>
2222
#include <ngx_http.h>
2323

src/proxy_wasm/proxy_wasm_map.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
*/
1717
#ifndef PROXY_WASM_MAP_H
1818
#define PROXY_WASM_MAP_H
19-
#include <stdbool.h>
19+
20+
#include <ngx_config.h>
2021
#include <ngx_core.h>
22+
#include <stdbool.h>
2123

2224

2325
typedef enum {

src/proxy_wasm/proxy_wasm_memory.h

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
#ifndef PROXY_WASM_MEMORY_H
1818
#define PROXY_WASM_MEMORY_H
19+
#include <ngx_config.h>
1920
#include <ngx_core.h>
2021

2122

src/proxy_wasm/proxy_wasm_types.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef PROXY_WASM_TYPES_H
1818
#define PROXY_WASM_TYPES_H
1919

20-
20+
#include <ngx_config.h>
2121
#include <ngx_core.h>
2222
#include <ngx_http_lua_api.h>
2323

src/vm/vm.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#define VM_H
1919

2020

21-
#include <stdbool.h>
21+
#include <ngx_config.h>
2222
#include <ngx_core.h>
23+
#include <stdbool.h>
2324

2425

2526
#define NGX_WASM_PARAM_VOID 1

src/vm/wasmtime.c

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*
1616
*/
17+
18+
#include <ngx_config.h>
19+
#include <ngx_core.h>
1720
#include <wasi.h>
1821
#include <wasm.h>
1922
#include <wasmtime.h>

0 commit comments

Comments
 (0)