The declarations for optarg and optind are pulled in from <unistd.h>. No need to declare them again. Ok?
natano Index: main.c =================================================================== RCS file: /cvs/src/usr.sbin/config/main.c,v retrieving revision 1.53 diff -u -p -r1.53 main.c --- main.c 16 Oct 2016 08:47:17 -0000 1.53 +++ main.c 16 Oct 2016 08:58:07 -0000 @@ -58,9 +58,6 @@ int firstfile(const char *); int yyparse(void); -extern char *optarg; -extern int optind; - static struct hashtab *mkopttab; static struct nvlist **nextopt; static struct nvlist **nextdefopt;