Merge pull request #278576 from wegank/xmlstarlet-darwin

xmlstarlet: fix build on darwin
This commit is contained in:
Weijia Wang
2024-01-04 14:30:24 +01:00
committed by GitHub
2 changed files with 6 additions and 13 deletions
+6 -2
View File
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, autoreconfHook
, pkg-config
, libxml2
@@ -20,8 +21,11 @@ stdenv.mkDerivation rec {
buildInputs = [ libxml2 libxslt ];
patches = [
# Fixes an incompatible function pointer error with clang 16.
./fix-incompatible-function-pointer.patch
(fetchpatch {
name = "0001-Fix-build-with-libxml2-2.12.patch";
url = "https://sourceforge.net/p/xmlstar/patches/_discuss/thread/890e29655a/66ca/attachment/0001-Fix-build-with-libxml2-2.12.patch";
hash = "sha256-XEk7aFOdrzdec1j2ffERJQbLH0AUNJA52QwA9jf4XWA=";
})
];
preConfigure = ''
@@ -1,11 +0,0 @@
--- a/src/xml_elem.c 2012-08-12 09:18:59.000000000 -0600
+++ b/src/xml_elem.c 2023-07-11 13:17:14.220809280 -0600
@@ -186,7 +186,7 @@
* put @name into @data->array[@data->offset]
*/
static void
-hash_key_put(void *payload, void *data, xmlChar *name)
+hash_key_put(void *payload, void *data, const xmlChar *name)
{
ArrayDest *dest = data;
dest->array[dest->offset++] = name;