From a66b32d9295ed87698ffd98d82e9e5818ff799e5 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 7 Mar 2013 16:38:56 +0000 Subject: [PATCH] Ensure xmlSaveToBuffer is always defined RHEL4 vintage libxml2 header files are missing xmlSaveToBuffer despite the symbol existing in the binary Signed-off-by: Daniel P. Berrange --- tools/virsh-domain.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 96dd4fabd8..c2726889a1 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); +#endif + /* Gnulib doesn't guarantee SA_SIGINFO support. */ #ifndef SA_SIGINFO # define SA_SIGINFO 0