From: Guy Harris Date: Fri, 3 Jul 2020 08:08:52 +0000 (-0700) Subject: OK, maybe it's that we don't have version.h. X-Git-Tag: libpcap-1.10-bp~81 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/549ddd4ac9127bc6835074f3fb1a8c16ca3475b9 OK, maybe it's that we don't have version.h. [skip ci] --- diff --git a/pcap-npf.c b/pcap-npf.c index ea6b3f7e..5aeb0a11 100644 --- a/pcap-npf.c +++ b/pcap-npf.c @@ -2057,31 +2057,6 @@ DIAG_ON_DEPRECATION } } -/* XXX - see if *this* gets a de-constification warning */ - -extern const char *pcap_xyzzy_version(void); - -const char * -pcap_xyzzy_version(void) -{ - /* - * Generate the version string. - */ - char *packet_version_string = PacketGetVersion(); - char *packet_LPCSTR = PacketGetLPCSTR(); - char *packet_const_char_star = PacketGetConstCharStar(); - char *full_pcap_version_string; - - if (pcap_asprintf(&full_pcap_version_string, - "blah blah blah %s %s %s", - packet_version_string, - packet_LPCSTR, packet_const_char_star) != -1) { - /* Success */ - return (full_pcap_version_string); - } - return ""; -} - /* * We can't use the same code that we use on UN*X, as that's doing * UN*X-specific calls. @@ -2199,10 +2174,12 @@ pcap_lib_version(void) * version. */ char *full_pcap_version_string; + char *packet_LPCSTR = PacketGetLPCSTR(); + char *packet_const_char_star = PacketGetConstCharStar(); if (pcap_asprintf(&full_pcap_version_string, - PCAP_VERSION_STRING " (packet.dll version %s)", - PacketGetVersion()) != -1) { + PCAP_VERSION_STRING " (packet.dll version %s) blah blah blah %s", + PacketGetVersion(), packet_LPCSTR, packet_const_char_star) != -1) { /* Success */ pcap_lib_version_string = full_pcap_version_string; }