]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Ensure xmlSaveToBuffer is always defined
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 16:38:56 +0000 (16:38 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Mar 2013 18:10:35 +0000 (18:10 +0000)
RHEL4 vintage libxml2 header files are missing xmlSaveToBuffer
despite the symbol existing in the binary

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/virsh-domain.c

index 96dd4fabd8c1dcee36e073ebe2fa2c3dacf69fec..c2726889a1393ba88ffb60a582d52d2e511f0b2f 100644 (file)
 #include "virtypedparam.h"
 #include "virxml.h"
 
+/* libxml2 in RHEL4 has this symbol in the binary but it
+ * is commented out in the header, despite apparently
+ * working fine. This hacks around that header problem
+ */
+#ifndef xmlSaveToBuffer
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+xmlSaveToBuffer         (xmlBufferPtr buffer,
+                         const char *encoding,
+                         int options);
+#endif
+
 /* Gnulib doesn't guarantee SA_SIGINFO support.  */
 #ifndef SA_SIGINFO
 # define SA_SIGINFO 0