Skip to content

Commit

Permalink
Squelch another warning.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
guyharris committed Nov 6, 2019
1 parent 901e259 commit ce4f065
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions savefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -507,15 +503,19 @@ pcap_fopen_offline_with_tstamp_precision(FILE *fp, u_int precision,
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
Expand Down

0 comments on commit ce4f065

Please sign in to comment.