]> The Tcpdump Group git mirrors - libpcap/commitdiff
That worked; move it after the warning-disabling-and-reenabling.
authorGuy Harris <[email protected]>
Fri, 3 Jul 2020 07:58:30 +0000 (00:58 -0700)
committerGuy Harris <[email protected]>
Fri, 3 Jul 2020 07:58:30 +0000 (00:58 -0700)
[skip ci]

pcap-npf.c

index d16b09fb7fdbf63dec81b6a89053535d8c8faa68..ea6b3f7eaa85b1938830518ea4af08fb809668f9 100644 (file)
@@ -1899,31 +1899,6 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
        return (ret);
 }
 
-/* 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 "";
-}
-
 /*
  * Return the name of a network interface attached to the system, or NULL
  * if none can be found.  The interface must be configured up; the
@@ -2082,6 +2057,31 @@ 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.