diff --git a/capture_opts.c b/capture_opts.c index 4a27d7e892..5b384aa34e 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -28,6 +28,9 @@ #ifdef HAVE_LIBPCAP +#include +#include + #ifdef HAVE_IO_H # include #endif @@ -297,7 +300,7 @@ capture_opts_add_opt(capture_options *capture_opts, const char *appname, int opt } #else /* HAVE_PCAP_DATALINK_NAME_TO_VAL */ /* XXX - just treat it as a number */ - capture_opts->linktype = get_natural_int(optarg, "data link type"); + capture_opts->linktype = get_natural_int(appname, optarg, "data link type"); #endif /* HAVE_PCAP_DATALINK_NAME_TO_VAL */ break; #ifdef _WIN32 @@ -317,4 +320,4 @@ capture_opts_add_opt(capture_options *capture_opts, const char *appname, int opt } } -#endif /* HAVE_LIBPCAP */ \ No newline at end of file +#endif /* HAVE_LIBPCAP */