aboutsummaryrefslogtreecommitdiffstats
path: root/doc/plugins.example
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2018-11-23 20:39:50 +0000
committerJoão Valverde <j@v6e.pt>2018-11-24 02:09:29 +0000
commitf1cf2646aa44fe0f56019906d0edbc49253ececa (patch)
treef7e7f18d68d7dda648f68cbb3aca5dfbae033a9e /doc/plugins.example
parent47cd8c7e8ed5dcbe02f2dbf911b2125320c0347b (diff)
plugins.example: Fix build on Windows
Change-Id: I30798a697bc14076cc3bd9e224714a6a3567046b Reviewed-on: https://code.wireshark.org/review/30774 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'doc/plugins.example')
-rw-r--r--doc/plugins.example/README4
-rw-r--r--doc/plugins.example/hello.c13
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;