kumquat-buildroot/package/libiio/0001-xml-Fix-compatibility-with-libxml-2-12.patch
Fabrice Fontaine a92c0efb9f package/libiio: fix build with libxml2 >= 2.12
Fix the following build failure raised since bump of libxml2 to version
2.12.1 in commit d8ac52108c:

/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c: In function 'xml_create_context':
/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:15: warning: implicit declaration of function 'xmlReadFile' [-Wimplicit-function-declaration]
  481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
      |               ^~~~~~~~~~~
/home/buildroot/autobuild/instance-1/output-1/build/libiio-0.25/xml.c:481:43: error: 'XML_PARSE_DTDVALID' undeclared (first use in this function); did you mean 'XML_DOC_DTDVALID'?
  481 |         doc = xmlReadFile(xml_file, NULL, XML_PARSE_DTDVALID);
      |                                           ^~~~~~~~~~~~~~~~~~
      |                                           XML_DOC_DTDVALID

Fixes:
 - http://autobuild.buildroot.org/results/f97c2db33e07a02699e4650caf97de5f3c475eb8

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-01-01 21:34:46 +01:00

34 lines
921 B
Diff

From b1170cacff24cdfd3858edc2285c51cadef11488 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Sun, 10 Dec 2023 21:52:05 +0100
Subject: [PATCH] xml: Fix compatibility with libxml 2.12
libxml 2.12.0 reorganized includes, resulting in the following no longer being in scope:
- XML_PARSE_DTDVALID
- xmlReadMemory
- xmlReadFile
- xmlCleanupParser
Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
(cherry picked from commit bb688d04294dda45e68dfaf13e3bc1187841e52a)
Upstream: https://github.com/analogdevicesinc/libiio/commit/b1170cacff24cdfd3858edc2285c51cadef11488
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
xml.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xml.c b/xml.c
index 33f026103..3eaed92b3 100644
--- a/xml.c
+++ b/xml.c
@@ -10,6 +10,7 @@
#include "iio-private.h"
#include <errno.h>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include <string.h>