3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #246660 from reckenrode/xmlstarlet-fix

xmlstarlet: fix build with clang 16
This commit is contained in:
Weijia Wang 2023-08-06 01:07:29 +02:00 committed by GitHub
commit 5faab29808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libxml2 libxslt ];
patches = [
# Fixes an incompatible function pointer error with clang 16.
./fix-incompatible-function-pointer.patch
];
preConfigure =
''
export LIBXSLT_PREFIX=${libxslt.dev}

View file

@ -0,0 +1,11 @@
--- 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;