diff options
Diffstat (limited to 'epan/epan.c')
-rw-r--r-- | epan/epan.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c index 75ff54214b..e3a3ae85d1 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -84,6 +84,11 @@ #include <nghttp2/nghttp2ver.h> #endif +#ifdef HAVE_LIBXML2 +#include <libxml/xmlversion.h> +#include <libxml/parser.h> +#endif + static wmem_allocator_t *pinfo_pool_cache = NULL; const gchar* @@ -167,6 +172,10 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da #ifdef HAVE_LIBGNUTLS gnutls_global_init(); #endif +#ifdef HAVE_LIBXML2 + xmlInitParser(); + LIBXML_TEST_VERSION; +#endif TRY { tap_init(); prefs_init(); @@ -254,6 +263,9 @@ epan_cleanup(void) #ifdef HAVE_LIBGNUTLS gnutls_global_deinit(); #endif +#ifdef HAVE_LIBXML2 + xmlCleanupParser(); +#endif except_deinit(); addr_resolv_cleanup(); @@ -677,6 +689,14 @@ epan_get_compiled_version_info(GString *str) g_string_append(str, "without Snappy"); #endif /* HAVE_SNAPPY */ + /* libxml2 */ + g_string_append(str, ", "); +#ifdef HAVE_LIBXML2 + g_string_append(str, "with libxml2 " LIBXML_DOTTED_VERSION); +#else + g_string_append(str, "without libxml2"); +#endif /* HAVE_LIBXML2 */ + } /* |