From 31939b4a96a60b16187f8498f214e56aee79cd28 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 17 Jan 2026 13:11:12 +0000 Subject: [PATCH] tnef: fix `gcc-15` build failure Without the change the build fails on `master` as https://hydra.nixos.org/build/318200761: ``` gcc -DHAVE_CONFIG_H -I. -g -O2 -c -o attr.o attr.c attr.c:242:1: error: conflicting types for 'attr_read'; have 'Attr *(FILE *)' 242 | attr_read (FILE* in) | ^~~~~~~~~ In file included from attr.c:29: attr.h:72:14: note: previous declaration of 'attr_read' with type 'Attr *(void)' 72 | extern Attr* attr_read (); | ^~~~~~~~~ ``` --- pkgs/by-name/tn/tnef/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/tn/tnef/package.nix b/pkgs/by-name/tn/tnef/package.nix index e8322268836c..f80c31aec274 100644 --- a/pkgs/by-name/tn/tnef/package.nix +++ b/pkgs/by-name/tn/tnef/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, autoreconfHook, }: @@ -16,6 +17,15 @@ stdenv.mkDerivation rec { sha256 = "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"; }; + patches = [ + # Fix gcc-15 build failure: https://github.com/verdammelt/tnef/pull/49 + (fetchpatch { + name = "gcc-15.patch"; + url = "https://github.com/verdammelt/tnef/commit/86bfa75cfacbe71c8d5282fa0065981b4544c5ad.patch"; + hash = "sha256-iWQop57riqwDLVi5Ba5s4f34lGXgvKO3ZMTgWbAoRIY="; + }) + ]; + doCheck = true; nativeBuildInputs = [ autoreconfHook ];