9 Star 0 Fork 21

src-openEuler/lasso

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-misc-adjust-to-libxml-2.12.patch 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
From cbe2c45455d93ed793dc4be59e3d2d26f1bd1111 Mon Sep 17 00:00:00 2001
From: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date: Wed, 24 Jan 2024 15:15:39 +0100
Subject: [PATCH] misc: adjust to structured error callback argument change in
libxml2 2.12 (#86080)
---
lasso/lasso.c | 8 +++++++-
lasso/xml/tools.c | 9 ++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/lasso/lasso.c b/lasso/lasso.c
index 42b7d6bb..bc75f5e6 100644
--- a/lasso/lasso.c
+++ b/lasso/lasso.c
@@ -138,7 +138,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
#include "types.c"
static void
-lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error)
+lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data,
+#if LIBXML_VERSION >= 21200
+ const xmlError *error
+#else
+ xmlErrorPtr error
+#endif
+ )
{
g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message);
}
diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c
index bbc87d9f..4d5fa78a 100644
--- a/lasso/xml/tools.c
+++ b/lasso/xml/tools.c
@@ -1450,7 +1450,14 @@ lasso_concat_url_query(const char *url, const char *query)
}
}
-static void structuredErrorFunc (void *userData, xmlErrorPtr error) {
+static void structuredErrorFunc (void *userData,
+#if LIBXML_VERSION >= 21200
+ const xmlError *error
+#else
+ xmlErrorPtr error
+#endif
+ )
+{
*(int*)userData = error->code;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/lasso.git
git@gitee.com:src-openeuler/lasso.git
src-openeuler
lasso
lasso
master

搜索帮助