From e941e21cd6ab3727a7b49ccf9a2ec0fac13b22f5 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Thu, 4 Feb 2016 13:45:44 +0200 Subject: [PATCH] Enable errors about non-existing CLI options Set opterr and optind to their normal default values. --- src/extras/getopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extras/getopt.c b/src/extras/getopt.c index ba936f1c..137b7c14 100644 --- a/src/extras/getopt.c +++ b/src/extras/getopt.c @@ -85,8 +85,8 @@ static const char *progname; /* These are used to replace unistd.h include. */ char *optarg = 0; -int optind = 0; -int opterr = 0; +int optind = 1; +int opterr = 1; int optopt = 0; int optreset = 0;