aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-01-24 14:17:29 +0100
committerRoland Knall <rknall@gmail.com>2019-01-24 18:24:19 +0000
commit557607271af98316ac2208a61bee1151e8dad196 (patch)
treee0890c58626bec2f7ad8d0d85d5a2c9d49cac59b
parent0f4161a48c2c8a4a5f78552516731d26e2d96473 (diff)
EPL: fix build with incomplete libxml2 library
HAVE_LIBXML2 can be set while PARSE_XDD is unset, resulting in missing functions and linker errors. Bug: 15419 Change-Id: I0aa20a80080d159bfb6eebccc503b66cc148f7f8 Reviewed-on: https://code.wireshark.org/review/31715 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
-rw-r--r--epan/dissectors/packet-epl-profile-parser.c17
-rw-r--r--epan/dissectors/packet-epl.c3
-rw-r--r--epan/dissectors/packet-epl.h1
3 files changed, 11 insertions, 10 deletions
diff --git a/epan/dissectors/packet-epl-profile-parser.c b/epan/dissectors/packet-epl-profile-parser.c
index dd07f81c54..ce1b35032d 100644
--- a/epan/dissectors/packet-epl-profile-parser.c
+++ b/epan/dissectors/packet-epl-profile-parser.c
@@ -298,11 +298,6 @@ cleanup:
#ifdef PARSE_XDD
-void
-epl_xdd_init(void)
-{
-}
-
struct profile *
epl_xdd_load(struct profile *profile, const char *xml_file)
{
@@ -570,7 +565,17 @@ populate_object_list(xmlNodeSetPtr nodes, void *_profile)
}
-#endif /* PARSE_XDD */
+#else /* ! PARSE_XDD */
+
+#ifdef HAVE_LIBXML2
+struct profile *
+epl_xdd_load(struct profile *profile _U_, const char *xml_file _U_)
+{
+ return NULL;
+}
+#endif /* HAVE_LIBXML2 */
+
+#endif /* ! PARSE_XDD */
/**
* A sorted array keyed by intervals
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index 900c2f1c75..1617bf738e 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -6180,9 +6180,6 @@ proto_register_epl(void)
epl_profiles_by_nodeid = wmem_map_new(wmem_epan_scope(), g_direct_hash, g_direct_equal);
epl_profiles_by_address = wmem_map_new(wmem_epan_scope(), epl_address_hash, epl_address_equal);
-#ifdef HAVE_LIBXML2
- epl_xdd_init();
-#endif
epl_eds_init();
prefs_register_filename_preference(epl_module, "default_profile", "Default Profile to use if no specific profiles exist",
diff --git a/epan/dissectors/packet-epl.h b/epan/dissectors/packet-epl.h
index 79377798f3..4ca2a1d55c 100644
--- a/epan/dissectors/packet-epl.h
+++ b/epan/dissectors/packet-epl.h
@@ -89,7 +89,6 @@ subobject_equal(gconstpointer _a, gconstpointer _b)
&& g_str_equal(a->name, b->name);
}
-void epl_xdd_init(void);
struct profile *epl_xdd_load(struct profile *profile, const char *xml_file);
void epl_eds_init(void);