diff --git a/pkgs/by-name/li/libffi_3_3/package.nix b/pkgs/by-name/li/libffi_3_3/package.nix index fbf27320c26e..791799bc3337 100644 --- a/pkgs/by-name/li/libffi_3_3/package.nix +++ b/pkgs/by-name/li/libffi_3_3/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, doCheck ? true, # test suite depends on dejagnu which cannot be used during bootstrapping dejagnu, @@ -16,7 +17,15 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-cvunkicD3fp6Ao1ROsFahcjVTI1n9V+lpIAohdxlIFY="; }; - patches = [ ]; + patches = [ + # Backport gcc-15 fix: + # https://github.com/libffi/libffi/pull/861 + (fetchpatch { + name = "gcc-15.patch"; + url = "https://github.com/libffi/libffi/commit/0859f8431242d5adff21420b9cab538d2af527b5.patch"; + hash = "sha256-Py4ZAhVyXsfLxr4pnYAH7/lcsQOmpToFgvjQvLg9XVc="; + }) + ]; outputs = [ "out"