From 3a3fda2ca406e495ece5ad253e38be50c8881fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Sat, 3 Jul 2021 12:26:26 +0100 Subject: [PATCH] epan: Remove dependency on version_info object library Dependending on version_info is unnecessary and forces an epan rebuild every time the git commit id changes, which can be slow, especially with LTO enabled, and again is unnecessary. Printing the VCS version to the TLS debug log is a minor convenience that doesn't justify the cost to relink epan with every commit. --- epan/CMakeLists.txt | 1 - epan/dissectors/packet-tls-utils.c | 2 -- epan/epan.c | 8 ++++++-- epan/print.c | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 69965a3ff06..93bdabdc1ae 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -296,7 +296,6 @@ add_library(epan $ $ $ - $ $ $<$:$> ${CMAKE_BINARY_DIR}/image/libwireshark.rc diff --git a/epan/dissectors/packet-tls-utils.c b/epan/dissectors/packet-tls-utils.c index e1ee76e54d4..9fbb4ce8b7a 100644 --- a/epan/dissectors/packet-tls-utils.c +++ b/epan/dissectors/packet-tls-utils.c @@ -41,7 +41,6 @@ #include #include #include -#include #include "packet-ber.h" #include "packet-x509af.h" #include "packet-x509if.h" @@ -6191,7 +6190,6 @@ ssl_set_debug(const gchar* name) debug_file_must_be_closed = 0; ssl_debug_printf("Wireshark SSL debug log \n\n"); - ssl_debug_printf("Wireshark version: %s\n", get_ws_vcs_version_info()); #ifdef HAVE_LIBGNUTLS ssl_debug_printf("GnuTLS version: %s\n", gnutls_check_version(NULL)); #endif diff --git a/epan/epan.c b/epan/epan.c index 2b8f86e5973..1eb25814876 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -19,7 +19,6 @@ #include -#include #include #include @@ -128,7 +127,12 @@ epan_get_version(void) { void epan_get_version_number(int *major, int *minor, int *micro) { - get_ws_version_number(major, minor, micro); + if (major) + *major = VERSION_MAJOR; + if (minor) + *minor = VERSION_MINOR; + if (micro) + *micro = VERSION_MICRO; } #if defined(_WIN32) diff --git a/epan/print.c b/epan/print.c index 33062389dee..c53caa06840 100644 --- a/epan/print.c +++ b/epan/print.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include