mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #9] Failure to compile with mainline NGINX #141
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dvershinin on GitHub (Dec 8, 2020).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/9
Latest release 2.0.2 does not compile with NGINX 1.19.5. Errors:
Looks like the function
ngx_log_inithas changed its signature at some point and requires a second argument on the mainline branch only (stable is fine).@dvershinin commented on GitHub (Dec 9, 2020):
Shouldn't you be using something along the lines of
"#ifdef nginx_version"? That constant is bumped between stable and mainline and can be used to detect backward-incompatible changes...In
src/core/nginx.h. For mainline it's1019005and for stable it is1018000The breaking change of
ngx_log_t *ngx_log_init(u_char *prefix, u_char *error_log);was introduced only at 1.19.5 which is1019005, so I think it's easiest to do conditional code based on nginx_version >= 1019005 (instead of introducing another define/compilation option, just use what's there).@ADD-SP commented on GitHub (Dec 9, 2020):
Good idea, I didn't know about the
nginx_versionbefore.@ADD-SP commented on GitHub (Dec 9, 2020):
Thanks for your suggestion. This module is already compatible with the current Mainline NGINX, but considering that Mainline is still under development, there may be other compatibility issues in the future. So if in the future you encounter a compile error due to incompatibility with Mainline, it is recommended to reopen this issue unless necessary.