diff options
Diffstat (limited to 'src/cgls')
-rw-r--r-- | src/cgls/cgls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 32780c606a..a34b0aa604 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -93,6 +93,9 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 1); 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, "-hkalM:u::xc", options, NULL)) >= 0) switch (c) { |