Include <string.h> and <ctype.h> to get the appropriate functions

declared and macros defined.

Pass all the necessary arguments to "get_natural_int()".

svn path=/trunk/; revision=13490
This commit is contained in:
Guy Harris 2005-02-24 05:39:59 +00:00
parent 516d559fe8
commit 8718e20103
1 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,9 @@
#ifdef HAVE_LIBPCAP
#include <string.h>
#include <ctype.h>
#ifdef HAVE_IO_H
# include <io.h>
#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 */
#endif /* HAVE_LIBPCAP */