[librsvg] Fix build against old libxml2
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Fix build against old libxml2
- Date: Sun, 27 Jun 2010 17:42:55 +0000 (UTC)
commit a52d5bf6cbbffa89982b5f4820280c9d07aed2cb
Author: Christian Persch <chpe gnome org>
Date: Sun Jun 27 19:29:05 2010 +0200
Fix build against old libxml2
Before libxml2 commit
http://git.gnome.org/browse/libxml2/commit/?id=a8f09ce8d33dbadd398efe5af36ec7984de31e4c
xmlPushInput returned void, not int. The first release with this commit
is libxml2 2.7.0.
rsvg-base.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index b73d150..6d7a5c3 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1876,11 +1876,15 @@ rsvg_handle_read_stream_sync (RsvgHandle *handle,
buffer = _rsvg_xml_input_buffer_new_from_stream (stream, cancellable, XML_CHAR_ENCODING_NONE, &err);
input = xmlNewIOInputStream (priv->ctxt, buffer, XML_CHAR_ENCODING_NONE);
+#if LIBXML_VERSION >= 20700
if (xmlPushInput (priv->ctxt, input) < 0) {
rsvg_set_error (error, priv->ctxt);
xmlFreeInputStream (input);
return FALSE;
}
+#else
+ xmlPushInput (priv->ctxt, input);
+#endif
result = xmlParseDocument (priv->ctxt);
if (result != 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]