diff --git a/nmap.cc b/nmap.cc index 877fc99fa..b4b4967c7 100644 --- a/nmap.cc +++ b/nmap.cc @@ -2843,13 +2843,21 @@ static void display_nmap_version() { #endif #if HAVE_LIBSSH2 +#ifdef LIBSSH2_INCLUDED + with.push_back(std::string("nmap-libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); +#else with.push_back(std::string("libssh2-") + get_word_or_quote(LIBSSH2_VERSION_TEXT, 1)); +#endif #else without.push_back("libssh2"); #endif #if HAVE_LIBZ_V +#ifdef ZLIB_INCLUDED + with.push_back(std::string("nmap-libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); +#else with.push_back(std::string("libz-") + get_word_or_quote(LIBZ_VERSION_TEXT, 1)); +#endif #else without.push_back("libz"); #endif diff --git a/nmap_config.h.in b/nmap_config.h.in index cb53595ad..ae45eed84 100644 --- a/nmap_config.h.in +++ b/nmap_config.h.in @@ -238,6 +238,8 @@ extern "C" int gethostname (char *, unsigned int); #undef PCAP_INCLUDED #undef DNET_INCLUDED #undef PCRE_INCLUDED +#undef LIBSSH2_INCLUDED +#undef ZLIB_INCLUDED #undef DEC #undef LINUX