diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-09-29 19:49:51 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-10-03 10:09:24 +0000 |
commit | 2777003e121a5d764b54c62590e7ceb46ae2c157 (patch) | |
tree | 1ca9471c447c0fcf94640328fd1a3207224615ad /doc/plugins.example/Makefile.am | |
parent | d477ea35a946c2935974edb3fea45cf23513a03c (diff) |
Add version check for plugin compatibility
Only plugins built for the same feature release (X.Y) are assured binary
compatibility. Make sure we don't try to run unsuitable code and, if so,
warn the user. This might happen for example if the user manually copies
a binary plugin to the wrong folder, intentionally or by accident.
I'm using "release version" to loosely mean not a patch release
(i.e: a feature release).
Change-Id: I896e9cbbd2d3843623fff6af8ef51002ec06f1f8
Reviewed-on: https://code.wireshark.org/review/23807
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'doc/plugins.example/Makefile.am')
-rw-r--r-- | doc/plugins.example/Makefile.am | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/plugins.example/Makefile.am b/doc/plugins.example/Makefile.am index 1b9b5b0d27..b477e13933 100644 --- a/doc/plugins.example/Makefile.am +++ b/doc/plugins.example/Makefile.am @@ -23,17 +23,21 @@ WARNFLAGS = -Wall -Wextra plugindir := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --define-variable=libdir=$(libdir) --variable plugindir wireshark) +release_version := $(notdir $(plugindir)) + plugin_LTLIBRARIES = hello.la hello_la_SOURCES = hello.c +hello_la_CPPFLAGS = -DVERSION_RELEASE=\"$(release_version)\" + hello_la_CFLAGS = $(WIRESHARK_CFLAGS) -fvisibility=hidden $(WARNFLAGS) hello_la_LDFLAGS = -module -avoid-version -shared hello_la_LIBADD = $(WIRESHARK_LIBS) -homedir = $${HOME}/.local/lib/wireshark/plugins/$(notdir $(plugindir)) +homedir = $${HOME}/.local/lib/wireshark/plugins/$(release_version) install-home: $(MKDIR_P) $(homedir) || exit 1; \ |