Skip to content

Commit

Permalink
[fix] fixed a compilation error if compiled with very old nginx & gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
winshining committed May 12, 2024
1 parent 97d51bf commit b26f7f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ngx_http_flv_live_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ static ngx_int_t
ngx_http_flv_live_headers_filter(ngx_rtmp_session_t *s)
{
ngx_str_t value;
ngx_uint_t i, safe_status;
ngx_uint_t i;
#if (nginx_version >= 1007005)
ngx_uint_t safe_status;
#endif
ngx_http_header_val_t *h;
ngx_http_headers_conf_t *conf;
ngx_http_request_t *r;
Expand All @@ -533,6 +536,7 @@ ngx_http_flv_live_headers_filter(ngx_rtmp_session_t *s)
return ngx_http_flv_live_header_filter(s);
}

#if (nginx_version >= 1007005)
switch (r->headers_out.status) {

case NGX_HTTP_OK:
Expand All @@ -550,6 +554,7 @@ ngx_http_flv_live_headers_filter(ngx_rtmp_session_t *s)
default:
safe_status = 0;
}
#endif

if (conf->headers) {
h = conf->headers->elts;
Expand Down

0 comments on commit b26f7f3

Please sign in to comment.