From a1e4d5e2b1db8c7717c734162326896c30704180 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 6 Oct 2026 23:51:44 -0400 Subject: [PATCH] nginxModules.zip.tests.nginx: fix build with gcc 16 --- .../modules/zip/fix-gcc16-unused-counter.patch | 13 +++++++++++++ pkgs/servers/http/nginx/modules/zip/package.nix | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/servers/http/nginx/modules/zip/fix-gcc16-unused-counter.patch diff --git a/pkgs/servers/http/nginx/modules/zip/fix-gcc16-unused-counter.patch b/pkgs/servers/http/nginx/modules/zip/fix-gcc16-unused-counter.patch new file mode 100644 index 000000000000..e2ae69a5d09c --- /dev/null +++ b/pkgs/servers/http/nginx/modules/zip/fix-gcc16-unused-counter.patch @@ -0,0 +1,13 @@ +diff --git a/ngx_http_zip_module.c b/ngx_http_zip_module.c +index 49a7703..0629c43 100644 +--- a/ngx_http_zip_module.c ++++ b/ngx_http_zip_module.c +@@ -1006,6 +1006,8 @@ ngx_http_zip_send_pieces(ngx_http_request_t *r, + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "mod_zip: sent %d pieces, last rc = %d", pieces_sent, rc); + ++ (void)pieces_sent; ++ + if (rc == NGX_OK) { + ctx->trailer_sent = 1; + return ngx_http_send_special(r, NGX_HTTP_LAST); diff --git a/pkgs/servers/http/nginx/modules/zip/package.nix b/pkgs/servers/http/nginx/modules/zip/package.nix index 1ff4e5bf658a..f80871d440be 100644 --- a/pkgs/servers/http/nginx/modules/zip/package.nix +++ b/pkgs/servers/http/nginx/modules/zip/package.nix @@ -18,6 +18,8 @@ mkNginxPlugin (finalAttrs: { }; patches = [ + # https://github.com/evanmiller/mod_zip/pull/120 + ./fix-gcc16-unused-counter.patch (fetchpatch { name = "fix-upstream-subrequest-crc-calculation.patch"; url = "https://github.com/evanmiller/mod_zip/commit/8e65b82c82c7890f67a6107271c127e9881b6313.patch";