Skip to content

Commit

Permalink
add 1.27.2 and 1.26.2 to test target to check buildable?
Browse files Browse the repository at this point in the history
  • Loading branch information
sawanoboly committed Oct 12, 2024
1 parent 35e819b commit b66ab25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
strategy:
matrix:
NGINX_VERSION:
- 1.27.2
- 1.26.2
- 1.25.2
- 1.24.0
BUILD_DYNAMIC_MODULE:
Expand Down
8 changes: 8 additions & 0 deletions src/stream/ngx_stream_mruby_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ static mrb_value ngx_stream_mrb_add_listener(mrb_state *mrb, mrb_value self)
#else
ngx_uint_t i;
#endif
#if (nginx_version > 1025004)
ngx_stream_listen_opt_t *ls, *als;
#else
ngx_stream_listen_t *ls, *als;
#endif

mrb_get_args(mrb, "H", &listener);
address = mrb_hash_get(mrb, listener, mrb_check_intern_cstr(mrb, "address"));
Expand Down Expand Up @@ -81,7 +85,11 @@ static mrb_value ngx_stream_mrb_add_listener(mrb_state *mrb, mrb_value self)
mrb_raise(mrb, E_RUNTIME_ERROR, "ngx_stream_mrb_add_listener ngx_array_push failed");
}

#if (nginx_version > 1025004)
ngx_memzero(ls, sizeof(ngx_stream_listen_opt_t));
#else
ngx_memzero(ls, sizeof(ngx_stream_listen_t));
#endif

#if (nginx_version < 1015010)
ngx_memcpy(&ls->sockaddr.sockaddr, &u.sockaddr, u.socklen);
Expand Down

0 comments on commit b66ab25

Please sign in to comment.