html-xml-utils: fix build with GCC 15 (#484283)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Amaan Qureshi <git@amaanq.com>
|
||||
Date: Mon, 27 Jan 2026 00:00:00 -0500
|
||||
Subject: [PATCH] Fix GCC 15 build by adding proper function prototype
|
||||
|
||||
GCC 15 treats empty parentheses as (void), conflicting with the actual
|
||||
lookup_element signature generated by gperf. This was intentionally done,
|
||||
as version 7.7 removed the arguments because gperf 3.0 generates `unsigned int`
|
||||
while gperf 3.1 generates `size_t`. However, gperf 3.1 is nearly 10 years old,
|
||||
so it's reasonable to assume that practically every system that wants
|
||||
to use GCC 15 will have gperf 3.1 or later.
|
||||
|
||||
This patch uses `size_t` to match gperf 3.1.
|
||||
|
||||
---
|
||||
dtd.hash | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dtd.hash b/dtd.hash
|
||||
--- a/dtd.hash
|
||||
+++ b/dtd.hash
|
||||
@@ -43,8 +43,8 @@ EXPORT typedef struct _ElementType {
|
||||
} ElementType;
|
||||
|
||||
/* lookup_element -- look up the string in the hash table */
|
||||
-EXPORT const ElementType * lookup_element(/* register const char *str,
|
||||
- register unsigned int len */);
|
||||
+EXPORT const ElementType * lookup_element(register const char *str,
|
||||
+ register size_t len);
|
||||
|
||||
/* Different kinds of parent elements: */
|
||||
#define PHRASE "abbr", "acronym", "b", "bdi", "bdo", "big", "cite", "code", "dfn", "em", "i", "kbd", "q", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "tt", "u", "var"
|
||||
@@ -3,6 +3,7 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
curl,
|
||||
gperf,
|
||||
libiconv,
|
||||
}:
|
||||
|
||||
@@ -15,6 +16,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sha256 = "sha256-iIoxYxp6cDCLsvMz4HfQQW9Lt4MX+Gl/+0qVGH9ncwE=";
|
||||
};
|
||||
|
||||
patches = [ ./gcc15.patch ];
|
||||
|
||||
nativeBuildInputs = [ gperf ];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
libiconv
|
||||
|
||||
Reference in New Issue
Block a user