diff --git a/libcob/common.c b/libcob/common.c
index eef27ff..cb22742 100644
--- a/libcob/common.c
+++ b/libcob/common.c
@@ -136,6 +136,7 @@
 #if defined (WITH_XML2)
 #include <libxml/xmlversion.h>
 #include <libxml/xmlwriter.h>
+#include <libxml/parser.h> // for xmlCleanupParser
 #endif
 
 #if defined (WITH_CJSON)
