From 321754aaab31d549efcff43789da6f2ddfa3750a Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 20 Mar 2025 11:09:41 -0400 Subject: [PATCH] ldmud: apply patch for libxml2 2.12+ compat A fix is underway upstream, but the release cadence is such that we should expect to fix this locally for some time. --- pkgs/games/ldmud/default.nix | 2 ++ pkgs/games/ldmud/libxml2-2.12.0-compat.patch | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/games/ldmud/libxml2-2.12.0-compat.patch diff --git a/pkgs/games/ldmud/default.nix b/pkgs/games/ldmud/default.nix index 7d6092752066..a1c66918a690 100644 --- a/pkgs/games/ldmud/default.nix +++ b/pkgs/games/ldmud/default.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-PkrjP7tSZMaj61Hsn++7+CumhqFPLbf0+eAI6afP9HA="; }; + patches = [ ./libxml2-2.12.0-compat.patch ]; + sourceRoot = "${src.name}/src"; nativeBuildInputs = diff --git a/pkgs/games/ldmud/libxml2-2.12.0-compat.patch b/pkgs/games/ldmud/libxml2-2.12.0-compat.patch new file mode 100644 index 000000000000..372bdc8cafbd --- /dev/null +++ b/pkgs/games/ldmud/libxml2-2.12.0-compat.patch @@ -0,0 +1,18 @@ +diff --git src/pkg-xml2.c src/pkg-xml2.c +index 048ca38c..9ea4de35 100644 +--- src/pkg-xml2.c ++++ src/pkg-xml2.c +@@ -507,8 +507,13 @@ f_xml_generate (svalue_t *sp) + return sp; + } + ++#if LIBXML_VERSION >= 21200 ++static void ++xml_pkg_error_handler(void * userData, const xmlError *error) ++#else + static void + xml_pkg_error_handler(void * userData, xmlErrorPtr error) ++#endif + { + if (error) + {