From: Gisle Vanem Date: Thu, 1 May 2014 19:27:34 +0000 (-0700) Subject: Define optarg, optind, opterr, and optopt. X-Git-Tag: tcpdump-4.6.0~53 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/9221e6a1b5c95f16ab488d928f58c91769205e87?hp=040c96487cdc1f920c514e470d25fa1c80fd0154 Define optarg, optind, opterr, and optopt. That's necessary on Windows, where you're not going to get them defined by getopt(). --- diff --git a/missing/getopt_long.c b/missing/getopt_long.c index df6c7361..245e7bd3 100644 --- a/missing/getopt_long.c +++ b/missing/getopt_long.c @@ -79,6 +79,9 @@ #define W_PREFIX 2 #endif +char *optarg; +int optind, opterr, optopt; + static int getopt_internal(int, char * const *, const char *, const struct option *, int *, int); static int parse_long_options(char * const *, const char *,