diff --git a/epan/epan.c b/epan/epan.c index b52244c921..71191ecef2 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -85,8 +85,10 @@ epan_get_version(void) { void epan_register_plugin_types(void) { +#ifdef HAVE_PLUGINS register_dissector_plugin_type(); register_tap_plugin_type(); +#endif } void diff --git a/epan/proto.h b/epan/proto.h index f840403972..b6a091dab7 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -37,6 +37,8 @@ #ifndef __PROTO_H__ #define __PROTO_H__ +#include "config.h" + #ifdef HAVE_STDARG_H # include #else @@ -612,9 +614,11 @@ WS_DLL_PUBLIC void proto_tree_children_foreach(proto_tree *tree, /** Retrieve the wmem_allocator_t from a proto_node */ #define PNODE_POOL(proto_node) ((proto_node)->tree_data->pinfo->pool) +#ifdef HAVE_PLUGINS /** Register dissector plugin type with the plugin system. Called by epan_register_plugin_types(); do not call it yourself. */ extern void register_dissector_plugin_type(void); +#endif /** Sets up memory used by proto routines. Called at program startup */ void proto_init(void (register_all_protocols_func)(register_cb cb, gpointer client_data), diff --git a/epan/tap.h b/epan/tap.h index 692cd39c22..ea413f38db 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -25,6 +25,8 @@ #ifndef __TAP_H__ #define __TAP_H__ +#include "config.h" + #include #include "ws_symbol_export.h" @@ -46,9 +48,11 @@ typedef void (*tap_draw_cb)(void *tapdata); #define TL_IS_DISSECTOR_HELPER 0x00000004 /**< tap helps a dissector do work ** but does not, itself, require dissection */ +#ifdef HAVE_PLUGINS /** Register tap plugin type with the plugin system. Called by epan_register_plugin_types(); do not call it yourself. */ extern void register_tap_plugin_type(void); +#endif /* * For all tap plugins, call their register routines.