diff options
Diffstat (limited to 'meta-oe/recipes-support/xmlstarlet/files/0001-Define-ATTRIBUTE_UNUSED-if-its-not-defined.patch')
-rw-r--r-- | meta-oe/recipes-support/xmlstarlet/files/0001-Define-ATTRIBUTE_UNUSED-if-its-not-defined.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xmlstarlet/files/0001-Define-ATTRIBUTE_UNUSED-if-its-not-defined.patch b/meta-oe/recipes-support/xmlstarlet/files/0001-Define-ATTRIBUTE_UNUSED-if-its-not-defined.patch new file mode 100644 index 0000000000..1468559e7f --- /dev/null +++ b/meta-oe/recipes-support/xmlstarlet/files/0001-Define-ATTRIBUTE_UNUSED-if-its-not-defined.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 4e94034e9231f5d8312497b7504f21b7a6062bf4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 27 May 2025 16:12:01 -0700 | ||
4 | Subject: [PATCH] Define ATTRIBUTE_UNUSED if its not defined | ||
5 | |||
6 | ATTRIBUTE_UNUSED is not defined in libxml2 2.14+, so check if the define is | ||
7 | not there then define it. | ||
8 | |||
9 | Fixes build errors e.g. | ||
10 | ../xmlstarlet-1.6.1/src/xml_pyx.c:203:36: error: expected ')' | ||
11 | 203 | pyxExternalSubsetHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, | ||
12 | | ^ | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | src/xml_pyx.c | 7 +++++++ | ||
18 | 1 file changed, 7 insertions(+) | ||
19 | |||
20 | diff --git a/src/xml_pyx.c b/src/xml_pyx.c | ||
21 | index ab295f1..f1a1884 100644 | ||
22 | --- a/src/xml_pyx.c | ||
23 | +++ b/src/xml_pyx.c | ||
24 | @@ -21,6 +21,13 @@ | ||
25 | |||
26 | #include "xmlstar.h" | ||
27 | |||
28 | +/** | ||
29 | + * Unbreak build with libxml2 2.14 | ||
30 | + */ | ||
31 | +#ifndef ATTRIBUTE_UNUSED | ||
32 | +#define ATTRIBUTE_UNUSED __attribute__((unused)) | ||
33 | +#endif | ||
34 | + | ||
35 | /** | ||
36 | * Output newline and tab characters as escapes | ||
37 | * Required both for attribute values and character data (#PCDATA) | ||