2 Commits

3 changed files with 47 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
diff -Nurp vcdimager-2.0.1/frontends/xml/vcd_xml_common.c vcdimager-2.0.1-libxml214/frontends/xml/vcd_xml_common.c
--- vcdimager-2.0.1/frontends/xml/vcd_xml_common.c 2018-01-03 21:17:37.000000000 +0100
+++ vcdimager-2.0.1-libxml214/frontends/xml/vcd_xml_common.c 2025-04-26 05:22:03.008769534 +0200
@@ -242,17 +242,27 @@ _convert (const char in[], const char en
temp = size - 1;
if (from) {
- if (NULL != handler->output)
- ret = handler->output (out, &out_size, (const unsigned char *) in, &temp);
- else
+ if (!(handler->flags & 2) && NULL != handler->output.func)
+ ret = handler->output.func (handler->outputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
+ if ((handler->flags & 2) && NULL != handler->output.legacyFunc)
+ ret = handler->output.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
+ else {
+ xmlCharEncCloseFunc(handler);
return strdup(in);
+ }
} else {
- if (NULL != handler->input)
- ret = handler->input (out, &out_size, (const unsigned char *) in, &temp);
- else
+ if (!(handler->flags & 2) && NULL != handler->input.func)
+ ret = handler->input.func (handler->inputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
+ if ((handler->flags & 2) && NULL != handler->input.legacyFunc)
+ ret = handler->input.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
+ else {
+ xmlCharEncCloseFunc(handler);
return strdup(in);
+ }
}
+ xmlCharEncCloseFunc(handler);
+
if (ret < 0 || (temp - size + 1))
{
free (out);

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 23 13:20:07 UTC 2025 - pgajdos@suse.com
- fix build with libxml2 2.14
* vcdimager-libxml2-2.14.patch
-------------------------------------------------------------------
Fri Jun 29 15:35:14 UTC 2018 - olaf@aepfle.de

View File

@@ -1,7 +1,7 @@
#
# spec file for package vcdimager
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,6 +29,8 @@ Source: https://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz
Source1: https://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz.sig
Source2: baselibs.conf
Patch1: sector_private.patch
# https://gitlab.archlinux.org/archlinux/packaging/packages/vcdimager/-/raw/main/libxml214.diff?ref_type=heads
Patch2: vcdimager-libxml2-2.14.patch
BuildRequires: fdupes
BuildRequires: gawk
BuildRequires: gcc-c++