Add a libxml2 version check to make gst-compprep compile again on FC1
authorJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jun 2004 15:27:59 +0000 (15:27 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Sat, 12 Jun 2004 15:27:59 +0000 (15:27 +0000)
Original commit message from CVS:
Add a libxml2 version check to make gst-compprep compile again on FC1

ChangeLog
tools/gst-compprep.c

index 4f8f2b1..cc217b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-13  Jan Schmidt  <thaytan@mad.scientist.com>
+
+       * tools/gst-compprep.c: (handle_xmlerror), (main):
+       Add a check for the version that introduced SetStructuredError to fix
+       the build on FC1
+
 2004-06-12  Steve Lhomme  <steve.lhomme@free.fr>
 
        * win32/msvc71.sln:
index 12cbbb7..c9073f2 100644 (file)
@@ -10,12 +10,16 @@ GST_DEBUG_CATEGORY_STATIC (debug_compprep);
 #define GST_CAT_DEFAULT debug_compprep
 #define GST_COMPREG_FILE (GST_CACHE_DIR "/compreg.xml")
 
+#ifdef HAVE_LIBXML2
+#if LIBXML_VERSION >= 20600
 void
 handle_xmlerror (void *userData, xmlErrorPtr error)
 {
   g_print ("Error writing the completion registry: %s, %s\n", GST_COMPREG_FILE,
       error->message);
 }
+#endif
+#endif
 
 int
 main (int argc, char *argv[])
@@ -128,7 +132,9 @@ main (int argc, char *argv[])
   }
 
 #ifdef HAVE_LIBXML2
+#if LIBXML_VERSION >= 20600
   xmlSetStructuredErrorFunc (NULL, handle_xmlerror);
+#endif
   xmlSaveFormatFile (GST_COMPREG_FILE, doc, 1);
 #else
   xmlSaveFile (GST_COMPREG_FILE, doc);