]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch another warning.
authorGuy Harris <[email protected]>
Wed, 6 Nov 2019 02:48:15 +0000 (18:48 -0800)
committerGuy Harris <[email protected]>
Wed, 6 Nov 2019 02:48:15 +0000 (18:48 -0800)
pcap_fopen_offline() doesn't need to be defined as a function on
Windows.

That's the problem the previous checkin was trying to figure out, so
undo it.

savefile.c

index f6d8170f2d7e939f36e83f740b356fd709c81a1b..4d12c544512900f36d494218c1428543a3ed0d77 100644 (file)
 #include <config.h>
 #endif
 
-#ifndef BUILDING_PCAP
-#error "Wait, how can we not be building pcap?"
-#endif
-
 #include <pcap-types.h>
 #ifdef _WIN32
 #include <io.h>
@@ -507,15 +503,19 @@ found:
        return (p);
 }
 
-#ifdef _WIN32
-static
-#endif
+/*
+ * This isn't needed on Windows; we #define pcap_fopen_offline() as
+ * a wrapper around pcap_hopen_offline(), and we don't call it from
+ * inside this file, so it's unused.
+ */
+#ifndef _WIN32
 pcap_t *
 pcap_fopen_offline(FILE *fp, char *errbuf)
 {
        return (pcap_fopen_offline_with_tstamp_precision(fp,
            PCAP_TSTAMP_PRECISION_MICRO, errbuf));
 }
+#endif
 
 /*
  * Read packets from a capture file, and call the callback for each