forked from osmocom/wireshark
Fix build without pcap.
The files that use LONGOPT_CAPTURE_COMMON and OPTSTRING_CAPTURE_COMMON include capture_opts.h unconditionally, so there's no need to define them if we don't have pcap. In addition, we want the capture options "available" even if we don't have pcap, so we can tell the user "you're using a version of *shark without pcap, but you gave a capture option". Change-Id: I0bd3893b73d3d903610d0bc6cacb60bfb37096f4 Reviewed-on: https://code.wireshark.org/review/2503 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
5d65e022df
commit
235d3a2a3a
5
tshark.c
5
tshark.c
|
@ -915,11 +915,6 @@ show_version(GString *comp_info_str, GString *runtime_info_str)
|
|||
runtime_info_str->str);
|
||||
}
|
||||
|
||||
#ifndef HAVE_LIBPCAP
|
||||
#define LONGOPT_CAPTURE_COMMON
|
||||
#define OPTSTRING_CAPTURE_COMMON ""
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
@ -2161,10 +2161,6 @@ main(int argc, char *argv[])
|
|||
GtkosxApplication *theApp;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LIBPCAP
|
||||
#define OPTSTRING_CAPTURE_COMMON ""
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
||||
#define OPTSTRING OPTSTRING_CAPTURE_COMMON "C:g:Hh" "jJ:kK:lm:nN:o:P:r:R:St:u:vw:X:Y:z:"
|
||||
|
||||
static const char optstring[] = OPTSTRING;
|
||||
|
|
|
@ -499,11 +499,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
// XXX Should the remaining code be in WiresharkApplcation::WiresharkApplication?
|
||||
#ifndef HAVE_LIBPCAP
|
||||
#define LONGOPT_CAPTURE_COMMON
|
||||
#define OPTSTRING_CAPTURE_COMMON ""
|
||||
#endif /* HAVE_LIBPCAP */
|
||||
|
||||
#define OPTSTRING OPTSTRING_CAPTURE_COMMON "C:g:Hh" "jJ:kK:lm:nN:o:P:Qr:R:St:u:vw:X:z:"
|
||||
static const struct option long_options[] = {
|
||||
{(char *)"help", no_argument, NULL, 'h'},
|
||||
|
|
Loading…
Reference in New Issue