Skip to content

Commit 00a6ce4

Browse files
committed
add support of nginx >= 1.21.5
ngx_http_graphite_get_source(): Starting from nginx v1.21.5 ngx_regex_exec() is a function, not a macro. The function accepts (ngx_str_t*) as the second parameter, not (const ngx_str_t*). But actually the function doesn't modify the structure, so we can safely cast a pointer. Fixes #47
1 parent cf2904c commit 00a6ce4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ngx_http_graphite_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,7 +2020,7 @@ ngx_http_graphite_get_source(ngx_http_graphite_context_t *context, const ngx_str
20202020
return NGX_ERROR;
20212021
}
20222022

2023-
if (ngx_regex_exec(rc.regex, name, NULL, 0) >= 0)
2023+
if (ngx_regex_exec(rc.regex, (ngx_str_t*)name, NULL, 0) >= 0)
20242024
break;
20252025
}
20262026
}

0 commit comments

Comments
 (0)