Grabbed from FreeBSD ports
https://cgit.freebsd.org/ports/commit/?id=9acdf260eddc1fed2be63fca0115fb19ddaa1f4f

--- a/rsvg-css.c.orig	2018-10-01 22:50:22 UTC
+++ b/rsvg-css.c
@@ -839,7 +839,11 @@ static void
 }
 
 static void
+#if LIBXML_VERSION < 21200
 rsvg_xml_noerror (void *data, xmlErrorPtr error)
+#else
+rsvg_xml_noerror (void *data, const xmlError *error)
+#endif
 {
 }
 
--- a/rsvg-private.h.orig	2020-02-26 17:40:25 UTC
+++ b/rsvg-private.h
@@ -32,6 +32,7 @@
 #include "rsvg.h"
 
 #include <libxml/SAX.h>
+#include <libxml/tree.h>
 #include <libxml/xmlmemory.h>
 #include <pango/pango.h>
 #include <glib.h>
