Skip to content

cant compile with nginx 1.21.4 #5

@Vladislavik

Description

@Vladislavik

Hi, i am trying to compile with nginx 1.21.4 with this configure:
./configure (...) --add-module=./ngx_http_websocket_stat_module
configure runs normal, but 'make' return error:
make ....... -o objs/addon/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.o \ /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c In file included from /usr/include/string.h:494, from src/os/unix/ngx_linux_config.h:27, from src/core/ngx_config.h:26, from src/core/ngx_core.h:12, from /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_format.h:18, from /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c:1: In function ‘memcpy’, inlined from ‘send_close_packet’ at /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c:674:5, inlined from ‘check_ws_age.isra.1.part.2’ at /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c:302:9, inlined from ‘check_ws_age.isra.1’ at /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c:296:1, inlined from ‘my_send’ at /opt/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.c:320:9: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: ‘__builtin_memcpy’ forming offset 20 is out of the bounds [0, 19] [-Werror=array-bounds] return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [objs/Makefile:2079: objs/addon/ngx_http_websocket_stat_module/ngx_http_websocket_stat_module.o] Error 1 make[1]: Leaving directory '/opt/nginx-1.21.4' make: *** [Makefile:10: build] Error 2
How to fix this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions