Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

getting error while compiling module  #113

@adeshmrane

Description

@adeshmrane
    /setups/nginx-sxg-module/ngx_sxg_utils.c

/setups/nginx-sxg-module/ngx_sxg_utils.c: In function ‘get_term_length’:
/setups/nginx-sxg-module/ngx_sxg_utils.c:38:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i < len; ++i) {
^
/setups/nginx-sxg-module/ngx_sxg_utils.c:38:3: note: use option -std=c99 or -std=gnu99 to compile your code
/setups/nginx-sxg-module/ngx_sxg_utils.c: In function ‘sxg_qvalue_is_1’:
/setups/nginx-sxg-module/ngx_sxg_utils.c:165:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (const char* const end = str + len; str < end;) {
^
/setups/nginx-sxg-module/ngx_sxg_utils.c: In function ‘check_refresh_needed’:
/setups/nginx-sxg-module/ngx_sxg_utils.c:365:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < resps; ++i) {
^

tried compiling this module with ngnix getting above error

If i try CFLAGS="$CFLAGS -std=c99" getting error for u_char datatype

Please help me with this how to compile this module with Ngnix
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions