From 5f224ecea266a3c04717d512fee2bd851ef69084 Mon Sep 17 00:00:00 2001 From: Robert Roland Date: Tue, 7 Jan 2025 16:58:02 -0800 Subject: [PATCH] Add missing include for libxml2 to gnucobol Fixes compilation error: error: implicit declaration of function 'xmlCleanupParser' --- .../gn/gnucobol/fix-libxml2-include.patch | 16 ++++++++++++++++ pkgs/by-name/gn/gnucobol/package.nix | 4 ++++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/by-name/gn/gnucobol/fix-libxml2-include.patch diff --git a/pkgs/by-name/gn/gnucobol/fix-libxml2-include.patch b/pkgs/by-name/gn/gnucobol/fix-libxml2-include.patch new file mode 100644 index 0000000000000..5e43ddc96961f --- /dev/null +++ b/pkgs/by-name/gn/gnucobol/fix-libxml2-include.patch @@ -0,0 +1,16 @@ +libcob: Fix include for xmlCleanupParser + +common.c uses xmlCleanupParser, which is defined in libxml/parser.h. +--- + +--- a/libcob/common.c 2025-01-01 03:03:49.762316279 +0100 ++++ b/libcob/common.c 2025-01-01 03:01:56.632597306 +0100 +@@ -136,6 +136,7 @@ + #if defined (WITH_XML2) + #include + #include ++#include + #endif + + #if defined (WITH_CJSON) + diff --git a/pkgs/by-name/gn/gnucobol/package.nix b/pkgs/by-name/gn/gnucobol/package.nix index 75341f91bbb96..ef165c8e45f7d 100644 --- a/pkgs/by-name/gn/gnucobol/package.nix +++ b/pkgs/by-name/gn/gnucobol/package.nix @@ -63,6 +63,10 @@ stdenv.mkDerivation (finalAttrs: { # XXX: Without this, we get a cycle between bin and dev propagatedBuildOutputs = [ ]; + patches = [ + ./fix-libxml2-include.patch + ]; + # Skips a broken test postPatch = '' sed -i '/^AT_CHECK.*crud\.cob/i AT_SKIP_IF([true])' tests/testsuite.src/listings.at