1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/net/ngrep/files/patch-ngrep.c
David E. O'Brien ea0bdc3c86 GNU configure is setting up PCAP_RESTART to use yyrestart. yyrestart in the
pcap library requires a FILE * argument, ngrep is called it with none.

Submitted by:	Barry Lustig <barry@lustig.com>
2000-01-31 21:13:55 +00:00

20 lines
448 B
C

--- ngrep.c.orig Fri Oct 22 05:21:26 1999
+++ ngrep.c Mon Jan 31 12:58:36 2000
@@ -59,6 +59,7 @@
int link_offset;
pcap_t *pd;
+extern FILE *yyin;
int main(int argc, char **argv) {
char c;
@@ -141,7 +142,7 @@
free(filter);
filter = get_filter(&argv[optind-1]);
- PCAP_RESTART();
+ PCAP_RESTART(yyin);
if (pcap_compile(pd,&pcapfilter,filter,0,mask.s_addr)) {
pcap_perror(pd,"pcap compile");
exit(-1);