From d0a91b27f26762e9c998cc5e6fe71767de5d32c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Tue, 5 Sep 2017 17:18:00 +0100 Subject: plugins: config.h must not be included by public headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 Petri-Dish: João Valverde Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde --- epan/asm_utils.c | 1 + epan/dfilter/drange.h | 1 + epan/dfilter/sttype-set.h | 2 ++ epan/dissectors/packet-epl-profile-parser.c | 1 + epan/dissectors/snort-config.h | 2 ++ epan/dtd.h | 1 + epan/except.h | 1 + epan/exported_pdu.h | 3 +-- epan/plugin_if.h | 3 +-- epan/proto.h | 1 + epan/wmem/wmem_core.h | 1 + 11 files changed, 13 insertions(+), 4 deletions(-) (limited to 'epan') diff --git a/epan/asm_utils.c b/epan/asm_utils.c index e02a737850..62ef49b095 100644 --- a/epan/asm_utils.c +++ b/epan/asm_utils.c @@ -26,6 +26,7 @@ #include #include "asm_utils.h" +#include "ws_attributes.h" /* String comparison func for dfilter_token GTree */ gint diff --git a/epan/dfilter/drange.h b/epan/dfilter/drange.h index d834c1d48f..6cad1f18ec 100644 --- a/epan/dfilter/drange.h +++ b/epan/dfilter/drange.h @@ -26,6 +26,7 @@ #include #include "ws_symbol_export.h" +#include "ws_attributes.h" /* Please don't directly manipulate these structs. Please use * the methods provided. If you REALLY can't do what you need to diff --git a/epan/dfilter/sttype-set.h b/epan/dfilter/sttype-set.h index 45576b58c2..51c3d159a3 100644 --- a/epan/dfilter/sttype-set.h +++ b/epan/dfilter/sttype-set.h @@ -24,6 +24,8 @@ #include +#include "ws_attributes.h" + void sttype_set_replace_element(stnode_t *node, stnode_t *oldnode, stnode_t *newnode); diff --git a/epan/dissectors/packet-epl-profile-parser.c b/epan/dissectors/packet-epl-profile-parser.c index f45e08f772..e4699a7254 100644 --- a/epan/dissectors/packet-epl-profile-parser.c +++ b/epan/dissectors/packet-epl-profile-parser.c @@ -31,6 +31,7 @@ #include "config.h" #include "packet-epl.h" +#include "ws_attributes.h" #include #include diff --git a/epan/dissectors/snort-config.h b/epan/dissectors/snort-config.h index 09a40ca1c9..411f26a63a 100644 --- a/epan/dissectors/snort-config.h +++ b/epan/dissectors/snort-config.h @@ -27,6 +27,8 @@ #ifndef SNORT_CONFIG_H #define SNORT_CONFIG_H +#include "ws_attributes.h" + /************************************************************************/ /* Rule related data types */ diff --git a/epan/dtd.h b/epan/dtd.h index 64e07e591c..2507303760 100644 --- a/epan/dtd.h +++ b/epan/dtd.h @@ -30,6 +30,7 @@ #include #include /* exit() */ +#include "ws_attributes.h" typedef struct _dtd_build_data_t { gchar* proto_name; diff --git a/epan/except.h b/epan/except.h index 0f979637e9..45ce069c72 100644 --- a/epan/except.h +++ b/epan/except.h @@ -35,6 +35,7 @@ #include #include #include "ws_symbol_export.h" +#include "ws_attributes.h" #define XCEPT_GROUP_ANY 0 #define XCEPT_CODE_ANY 0 diff --git a/epan/exported_pdu.h b/epan/exported_pdu.h index 8a3beb57c8..2220020fc4 100644 --- a/epan/exported_pdu.h +++ b/epan/exported_pdu.h @@ -25,9 +25,8 @@ #ifndef EXPORTED_PDU_H #define EXPORTED_PDU_H -#include - #include "ws_symbol_export.h" +#include "ws_attributes.h" #include diff --git a/epan/plugin_if.h b/epan/plugin_if.h index 61258a92d8..8cd0c6a883 100644 --- a/epan/plugin_if.h +++ b/epan/plugin_if.h @@ -29,9 +29,8 @@ #ifndef EPAN_PLUGIN_IF_H #define EPAN_PLUGIN_IF_H -#include - #include "ws_symbol_export.h" +#include "ws_attributes.h" #include #include diff --git a/epan/proto.h b/epan/proto.h index deecd478a3..6981af8f04 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -51,6 +51,7 @@ #include "ftypes/ftypes.h" #include "register.h" #include "ws_symbol_export.h" +#include "ws_attributes.h" #ifdef __cplusplus extern "C" { diff --git a/epan/wmem/wmem_core.h b/epan/wmem/wmem_core.h index fc04524de8..a3cab03ee5 100644 --- a/epan/wmem/wmem_core.h +++ b/epan/wmem/wmem_core.h @@ -27,6 +27,7 @@ #include #include #include +#include "ws_attributes.h" #ifdef __cplusplus extern "C" { -- cgit v1.2.3