diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/plugins.example/README | 4 | ||||
-rw-r--r-- | doc/plugins.example/hello.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/doc/plugins.example/README b/doc/plugins.example/README index 0f44036a18..0841868188 100644 --- a/doc/plugins.example/README +++ b/doc/plugins.example/README @@ -1,8 +1,8 @@ This is an example of how to build a Wireshark plugin out-of-tree. -Tested on Linux using GCC 7. Note this builds against Wireshark's *installed* -version. You should of course adapt to your own needs. +Note that this builds against Wireshark's *installed* version. You should of +course adapt to your own needs. To build/install the plugin: diff --git a/doc/plugins.example/hello.c b/doc/plugins.example/hello.c index 4e128afeda..26f00c96c3 100644 --- a/doc/plugins.example/hello.c +++ b/doc/plugins.example/hello.c @@ -11,22 +11,23 @@ #include "config.h" #endif +#define WS_BUILD_DLL + #include <epan/packet.h> #include <epan/proto.h> #include <ws_attributes.h> +#include <ws_symbol_export.h> #include <ws_version.h> #ifndef VERSION #define VERSION "0.0.0" #endif -#define DLL_PUBLIC __attribute__((__visibility__("default"))) - -DLL_PUBLIC const gchar plugin_version[] = VERSION; -DLL_PUBLIC const int plugin_want_major = WIRESHARK_VERSION_MAJOR; -DLL_PUBLIC const int plugin_want_minor = WIRESHARK_VERSION_MINOR; +WS_DLL_PUBLIC_DEF const gchar plugin_version[] = VERSION; +WS_DLL_PUBLIC_DEF const int plugin_want_major = WIRESHARK_VERSION_MAJOR; +WS_DLL_PUBLIC_DEF const int plugin_want_minor = WIRESHARK_VERSION_MINOR; -DLL_PUBLIC void plugin_register(void); +WS_DLL_PUBLIC void plugin_register(void); static int proto_hello = -1; |