0001-Fix-build-issues-with-libxml2-2.12.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. From 702988467d67c3a33255de4c543f56767c64c72e Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  3. Date: Sat, 23 Dec 2023 21:30:30 +0100
  4. Subject: [PATCH] Fix build issues with libxml2 2.12
  5. Based on initial work from Bernd Kuhls <bernd@kuhls.net>, improved by
  6. Yaakov Selkowitz.
  7. Upstream: https://sourceforge.net/p/xmlstar/patches/22/
  8. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  9. ---
  10. src/trans.h | 1 +
  11. src/xml.c | 2 +-
  12. src/xml_edit.c | 1 +
  13. src/xml_elem.c | 2 +-
  14. src/xml_format.c | 1 +
  15. src/xmlstar.h | 2 +-
  16. 6 files changed, 6 insertions(+), 3 deletions(-)
  17. diff --git a/src/trans.h b/src/trans.h
  18. index 016304e..395462c 100644
  19. --- a/src/trans.h
  20. +++ b/src/trans.h
  21. @@ -36,6 +36,7 @@ THE SOFTWARE.
  22. #include <libxml/xinclude.h>
  23. #include <libxml/parserInternals.h>
  24. #include <libxml/uri.h>
  25. +#include <libxml/globals.h>
  26. #include <libxslt/xslt.h>
  27. #include <libxslt/xsltInternals.h>
  28. diff --git a/src/xml.c b/src/xml.c
  29. index cf47cc2..e6f19c1 100644
  30. --- a/src/xml.c
  31. +++ b/src/xml.c
  32. @@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) {
  33. /* by default all errors are reported */
  34. static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE };
  35. -void reportError(void *ptr, xmlErrorPtr error)
  36. +void reportError(void *ptr, const xmlError *error)
  37. {
  38. ErrorInfo *errorInfo = (ErrorInfo*) ptr;
  39. assert(errorInfo);
  40. diff --git a/src/xml_edit.c b/src/xml_edit.c
  41. index e199178..b3da8a4 100644
  42. --- a/src/xml_edit.c
  43. +++ b/src/xml_edit.c
  44. @@ -42,6 +42,7 @@ THE SOFTWARE.
  45. #include <libxml/xpointer.h>
  46. #include <libxml/parserInternals.h>
  47. #include <libxml/uri.h>
  48. +#include <libxml/globals.h>
  49. #include <libexslt/exslt.h>
  50. #include "xmlstar.h"
  51. diff --git a/src/xml_elem.c b/src/xml_elem.c
  52. index 024e62a..a73038a 100644
  53. --- a/src/xml_elem.c
  54. +++ b/src/xml_elem.c
  55. @@ -186,7 +186,7 @@ typedef struct {
  56. * put @name into @data->array[@data->offset]
  57. */
  58. static void
  59. -hash_key_put(void *payload, void *data, xmlChar *name)
  60. +hash_key_put(void *payload, void *data, const xmlChar *name)
  61. {
  62. ArrayDest *dest = data;
  63. dest->array[dest->offset++] = name;
  64. diff --git a/src/xml_format.c b/src/xml_format.c
  65. index e9da4df..ddd6614 100644
  66. --- a/src/xml_format.c
  67. +++ b/src/xml_format.c
  68. @@ -42,6 +42,7 @@ THE SOFTWARE.
  69. #include <libxml/xpointer.h>
  70. #include <libxml/parserInternals.h>
  71. #include <libxml/uri.h>
  72. +#include <libxml/globals.h>
  73. #include "xmlstar.h"
  74. diff --git a/src/xmlstar.h b/src/xmlstar.h
  75. index 3e1eed3..e8d7177 100644
  76. --- a/src/xmlstar.h
  77. +++ b/src/xmlstar.h
  78. @@ -32,7 +32,7 @@ typedef struct _errorInfo {
  79. ErrorStop stop;
  80. } ErrorInfo;
  81. -void reportError(void *ptr, xmlErrorPtr error);
  82. +void reportError(void *ptr, const xmlError *error);
  83. void suppressErrors(void);
  84. typedef struct _gOptions {
  85. --
  86. 2.43.0