aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-11-05 18:48:15 -0800
committerGuy Harris <guy@alum.mit.edu>2019-11-05 18:48:15 -0800
commitce4f065ebaedd1a8687edfd47aa51a9233727800 (patch)
treed28288b7fc042d4d48deabfb46a628cbb05dea6b
parent901e2598bd2e2b83cdd6c190c5a5bfc968999460 (diff)
Squelch another warning.
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.
-rw-r--r--savefile.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/savefile.c b/savefile.c
index f6d8170f..4d12c544 100644
--- a/savefile.c
+++ b/savefile.c
@@ -32,10 +32,6 @@
#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