diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-03-07 12:37:14 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-08 10:07:28 -0800 |
commit | 6b0da50505e8d12bb8c0e56ff88a02714f0dca29 (patch) | |
tree | 75729d92921c5cb1d23ab0fdc33418bd9e497818 /meta-oe/recipes-support | |
parent | 18e019ee2295ab42849e510d5efeee94bf1d9056 (diff) | |
download | meta-openembedded-6b0da50505e8d12bb8c0e56ff88a02714f0dca29.tar.gz |
xmlstarlet: Fix build with API breakage in libxml2 2.12
Fixes
| 300 | xmlSetStructuredErrorFunc(&errorInfo, reportError);
| | ^~~~~~~~~~~
| /mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/xmlstarlet/1.6.1/recipe-sysroot/usr/lib/../include/libxml2/libxml/xmlerror.h:898:29: note: passing argument to parameter 'handler' here
| 898 | xmlStructuredErrorFunc handler);
| | ^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/xmlstarlet/files/0001-Make-xmlError-struct-constant.patch | 45 | ||||
-rw-r--r-- | meta-oe/recipes-support/xmlstarlet/xmlstarlet_1.6.1.bb | 1 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xmlstarlet/files/0001-Make-xmlError-struct-constant.patch b/meta-oe/recipes-support/xmlstarlet/files/0001-Make-xmlError-struct-constant.patch new file mode 100644 index 000000000..a9d98db69 --- /dev/null +++ b/meta-oe/recipes-support/xmlstarlet/files/0001-Make-xmlError-struct-constant.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From f7a5ebc3a673b246a64c9a664df304c1520a3951 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 7 Mar 2024 12:35:17 -0800 | ||
4 | Subject: [PATCH] Make xmlError struct constant | ||
5 | |||
6 | In libxml2 commit v2.12.0~14 the API changed so that | ||
7 | xmlGetLastError() returns pointer to a constant xmlError struct. | ||
8 | Reflect this change in our code. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/xml.c | 2 +- | ||
14 | src/xmlstar.h | 2 +- | ||
15 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/src/xml.c b/src/xml.c | ||
18 | index cf47cc2..e6f19c1 100644 | ||
19 | --- a/src/xml.c | ||
20 | +++ b/src/xml.c | ||
21 | @@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) { | ||
22 | /* by default all errors are reported */ | ||
23 | static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE }; | ||
24 | |||
25 | -void reportError(void *ptr, xmlErrorPtr error) | ||
26 | +void reportError(void *ptr, const xmlError *error) | ||
27 | { | ||
28 | ErrorInfo *errorInfo = (ErrorInfo*) ptr; | ||
29 | assert(errorInfo); | ||
30 | diff --git a/src/xmlstar.h b/src/xmlstar.h | ||
31 | index 3e1eed3..7e41ac4 100644 | ||
32 | --- a/src/xmlstar.h | ||
33 | +++ b/src/xmlstar.h | ||
34 | @@ -32,7 +32,7 @@ typedef struct _errorInfo { | ||
35 | ErrorStop stop; | ||
36 | } ErrorInfo; | ||
37 | |||
38 | -void reportError(void *ptr, xmlErrorPtr error); | ||
39 | +void reportError(void *ptr, const xmlError* error); | ||
40 | void suppressErrors(void); | ||
41 | |||
42 | typedef struct _gOptions { | ||
43 | -- | ||
44 | 2.44.0 | ||
45 | |||
diff --git a/meta-oe/recipes-support/xmlstarlet/xmlstarlet_1.6.1.bb b/meta-oe/recipes-support/xmlstarlet/xmlstarlet_1.6.1.bb index 930fbdd6c..61eeaaa09 100644 --- a/meta-oe/recipes-support/xmlstarlet/xmlstarlet_1.6.1.bb +++ b/meta-oe/recipes-support/xmlstarlet/xmlstarlet_1.6.1.bb | |||
@@ -15,6 +15,7 @@ DEPENDS = "libxml2 libxslt" | |||
15 | SRC_URI = "${SOURCEFORGE_MIRROR}/xmlstar/${BP}.tar.gz \ | 15 | SRC_URI = "${SOURCEFORGE_MIRROR}/xmlstar/${BP}.tar.gz \ |
16 | file://configure.ac.patch \ | 16 | file://configure.ac.patch \ |
17 | file://0001-usage2c.awk-fix-wrong-basename-regexp.patch \ | 17 | file://0001-usage2c.awk-fix-wrong-basename-regexp.patch \ |
18 | file://0001-Make-xmlError-struct-constant.patch \ | ||
18 | file://0001-Fix-hash_key_put-signature.patch" | 19 | file://0001-Fix-hash_key_put-signature.patch" |
19 | SRC_URI[sha256sum] = "15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca" | 20 | SRC_URI[sha256sum] = "15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca" |
20 | 21 | ||