]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
wireshark: Move WIRESHARK_VERSION macro definition
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 13 Oct 2025 07:04:17 +0000 (09:04 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 14 Oct 2025 13:08:26 +0000 (15:08 +0200)
Soon, other parts of the wireshark code will need to
differentiate wrt wireshark version. Therefore, move the
WIRESHARK_VERSION macro definition among with its deps into
packet-libvirt.h.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tools/wireshark/src/packet-libvirt.h
tools/wireshark/src/plugin.c

index 14e6e13696f22e73ad7ecca0ab9f0232f2b61368..15cfcb0534ca4dcbaaab76b9a7a39b5643939b3f 100644 (file)
 
 #pragma once
 
+#ifdef WITH_WS_VERSION
+# include <wireshark/ws_version.h>
+#else
+# include <wireshark/config.h>
+# define WIRESHARK_VERSION_MAJOR VERSION_MAJOR
+# define WIRESHARK_VERSION_MINOR VERSION_MINOR
+# define WIRESHARK_VERSION_MICRO VERSION_MICRO
+#endif
+
+#define WIRESHARK_VERSION \
+    ((WIRESHARK_VERSION_MAJOR * 1000 * 1000) + \
+     (WIRESHARK_VERSION_MINOR * 1000) + \
+     (WIRESHARK_VERSION_MICRO))
+
 void proto_register_libvirt(void);
 void proto_reg_handoff_libvirt(void);
index 19b25e7b1a3182636d188cf912f3be811c7da37f..64317b528071c8808f7749b6805449f5671f1670 100644 (file)
 
 #include <config.h>
 
-#ifdef WITH_WS_VERSION
-# include <wireshark/ws_version.h>
-#else
-# include <wireshark/config.h>
-# define WIRESHARK_VERSION_MAJOR VERSION_MAJOR
-# define WIRESHARK_VERSION_MINOR VERSION_MINOR
-# define WIRESHARK_VERSION_MICRO VERSION_MICRO
-#endif
-
 #define HAVE_PLUGINS 1
 #include <wireshark/epan/proto.h>
 /* plugins are DLLs */
 /* Let the plugin version be the version of libvirt */
 #define PLUGIN_VERSION VERSION
 
-#define WIRESHARK_VERSION \
-    ((WIRESHARK_VERSION_MAJOR * 1000 * 1000) + \
-     (WIRESHARK_VERSION_MINOR * 1000) + \
-     (WIRESHARK_VERSION_MICRO))
-
 #if WIRESHARK_VERSION < 2005000
 
 WS_DLL_PUBLIC_DEF const gchar version[] = VERSION;