On Thu, Mar 07, 2013 at 06:22:46PM +0100, Peter Krempa wrote: > On 03/07/13 17:41, Daniel P. Berrange wrote: > >From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> > > > >RHEL4 vintage libxml2 header files are missing xmlSaveToBuffer > >despite the symbol existing in the binary > > > >Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > >--- > > tools/virsh-domain.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > >diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c > >index 96dd4fa..950fc86 100644 > >--- a/tools/virsh-domain.c > >+++ b/tools/virsh-domain.c > >@@ -56,6 +56,17 @@ > > #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); > > The code where you copied this from uses tabs for indentation > breaking the syntax check. > > >+#endif > >+ > > /* Gnulib doesn't guarantee SA_SIGINFO support. */ > > #ifndef SA_SIGINFO > > # define SA_SIGINFO 0 > > > > I can't say I like this kind of hacks, but the explanation is fair > enough. Additionally the only function using that call is unused so > it might be better #if 0 it out instead of having the > ATTRIBUTE_UNUSED and that hack in the code. Hmm, why does vshCompleteXMLFromDomain exist at all, if nothgin is calling it. We should just delete it. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list