Skip to content

Commit

Permalink
Apply patch (requested by spz in ticket #1436):
Browse files Browse the repository at this point in the history
Adjust for older libpcap in netbsd-6*
  • Loading branch information
snj committed Feb 19, 2017
1 parent d17daf6 commit 6a661fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions external/bsd/tcpdump/dist/tcpdump.c
Expand Up @@ -30,7 +30,7 @@
static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
__RCSID("$NetBSD: tcpdump.c,v 1.3.12.1 2017/02/19 07:35:25 snj Exp $");
__RCSID("$NetBSD: tcpdump.c,v 1.3.12.2 2017/02/19 17:44:39 snj Exp $");
#endif

/*
Expand Down Expand Up @@ -156,8 +156,8 @@ static int Lflag; /* list available data link types and exit */
static int Iflag; /* rfmon (monitor) mode */
#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
static int Jflag; /* list available time stamp types */
#endif
static int jflag = -1; /* packet time stamp source */
#endif
static int pflag; /* don't go promiscuous */
#ifdef HAVE_PCAP_SETDIRECTION
static int Qflag = -1; /* restrict captured packet by send/receive direction */
Expand All @@ -166,7 +166,9 @@ static int Uflag; /* "unbuffered" output of dump files */
static int Wflag; /* recycle output files after this number of files */
static int WflagChars;
static char *zflag = NULL; /* compress each savefile using a specified command (like gzip or bzip2) */
#ifdef HAVE_PCAP_SET_IMMEDIATE_MODE
static int immediate_mode;
#endif

static int infodelay;
static int infoprint;
Expand All @@ -190,7 +192,9 @@ static RETSIGTYPE cleanup(int);
static RETSIGTYPE child_cleanup(int);
static void print_version(void);
static void print_usage(void);
#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
static void show_tstamp_types_and_exit(pcap_t *, const char *device) __attribute__((noreturn));
#endif
static void show_dlts_and_exit(pcap_t *, const char *device) __attribute__((noreturn));
#ifdef HAVE_PCAP_FINDALLDEVS
static void show_devices_and_exit (void) __attribute__((noreturn));
Expand Down
6 changes: 3 additions & 3 deletions external/bsd/tcpdump/include/config.h
Expand Up @@ -146,7 +146,7 @@
#define HAVE_PCAP_SET_DATALINK 1

/* Define to 1 if you have the `pcap_set_immediate_mode' function. */
#define HAVE_PCAP_SET_IMMEDIATE_MODE 1
/* #undef HAVE_PCAP_SET_IMMEDIATE_MODE */

/* Define to 1 if you have the `pcap_set_optimizer_debug' function. */
/* #undef HAVE_PCAP_SET_OPTIMIZER_DEBUG */
Expand All @@ -155,10 +155,10 @@
/* #undef HAVE_PCAP_SET_PARSER_DEBUG */

/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
#define HAVE_PCAP_SET_TSTAMP_PRECISION 1
/* #undef HAVE_PCAP_SET_TSTAMP_PRECISION */

/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
#define HAVE_PCAP_SET_TSTAMP_TYPE 1
/* #undef HAVE_PCAP_SET_TSTAMP_TYPE */

/* Define to 1 if you have the <pcap/usb.h> header file. */
/* #undef HAVE_PCAP_USB_H */
Expand Down

0 comments on commit 6a661fd

Please sign in to comment.