From 86f6c8c08cc8c5a5484ddcfc5011d2eab741b5a9 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sun, 21 Sep 2025 02:42:44 +0300 Subject: [PATCH] postfix: fix build with gcc15 - add "-std=gnu17" to `ccargs` Fixes build failure with gcc15: ``` In file included from flush_clnt.c:96: ./mail_params.h:17:13: error: 'bool' cannot be defined via 'typedef' 17 | typedef int bool; | ^~~~ ./mail_params.h:17:13: note: 'bool' is a keyword with '-std=c23' onwards ./mail_params.h:17:1: warning: useless type name in empty declaration 17 | typedef int bool; | ^~~~~~~ ``` --- pkgs/by-name/po/postfix/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/po/postfix/package.nix b/pkgs/by-name/po/postfix/package.nix index c3b4bb53ecee..e615ebd3568e 100644 --- a/pkgs/by-name/po/postfix/package.nix +++ b/pkgs/by-name/po/postfix/package.nix @@ -38,6 +38,9 @@ let "-DUSE_CYRUS_SASL" "-I${cyrus_sasl.dev}/include/sasl" "-DHAS_DB_BYPASS_MAKEDEFS_CHECK" + # Fix build with gcc15, no upstream fix for stable releases: + # https://www.mail-archive.com/postfix-devel@postfix.org/msg01270.html + "-std=gnu17" ] ++ lib.optional withPgSQL "-DHAS_PGSQL" ++ lib.optionals withMySQL [