From 63259895e5e5f38f46b0080b7dd429d52801f88c Mon Sep 17 00:00:00 2001 From: Mathtician Date: Wed, 21 Jan 2026 13:14:19 -0600 Subject: [PATCH] outguess: fix build outguess does not build with the current version of GCC. Added a postPatch to remove K&R-style function declarations. Package now compiles but has otherwise been minimally tested. --- pkgs/by-name/ou/outguess/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/ou/outguess/package.nix b/pkgs/by-name/ou/outguess/package.nix index 903c4754ffad..3d682afab665 100644 --- a/pkgs/by-name/ou/outguess/package.nix +++ b/pkgs/by-name/ou/outguess/package.nix @@ -22,6 +22,17 @@ stdenv.mkDerivation (finalAttrs: { configureFlags = [ "--with-generic-jconfig" ]; + # Fix build with modern compilers (GCC 14+) + # The bundled jpeg-6b-steg library uses K&R-style function declarations + # that are incompatible with modern C standards + postPatch = '' + substituteInPlace src/jpeg-6b-steg/jmorecfg.h \ + --replace-fail '#define JMETHOD(type,methodname,arglist) type (*methodname) ()' \ + '#define JMETHOD(type,methodname,arglist) type (*methodname) arglist' + substituteInPlace src/jpeg-6b-steg/jpeglib.h \ + --replace-fail '#ifdef HAVE_PROTOTYPES' '#if 1 /* Force ANSI prototypes */' + ''; + meta = { description = "Universal steganographic tool that allows the insertion of hidden information into the redundant bits of data sources"; homepage = "https://github.com/resurrecting-open-source-projects/outguess";