Skip to content

Commit

Permalink
Merge pull request #246660 from reckenrode/xmlstarlet-fix
Browse files Browse the repository at this point in the history
xmlstarlet: fix build with clang 16
  • Loading branch information
wegank authored Aug 5, 2023
2 parents 358232e + 62ddedb commit 5faab29
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/tools/text/xml/xmlstarlet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 5faab29

Please sign in to comment.