diff options
Diffstat (limited to 'src/run')
-rw-r--r-- | src/run/run.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/run/run.c b/src/run/run.c index 2f5ec9c73b..41570bf12e 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -246,6 +246,9 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); + /* Resetting to 0 forces the invocation of an internal initialization routine of getopt_long() + * that checks for GNU extensions in optstring ('-' or '+' at the beginning). */ + optind = 0; while ((c = getopt_long(argc, argv, "+hrH:M:E:p:tPqGdSu:", options, NULL)) >= 0) switch (c) { |