examples/parse_args.h: set optind = 1 if no getopt.h
authorPaul Brossier <piem@piem.org>
Sat, 23 Apr 2016 19:16:00 +0000 (21:16 +0200)
committerPaul Brossier <piem@piem.org>
Sat, 23 Apr 2016 19:16:00 +0000 (21:16 +0200)
examples/parse_args.h

index 5090f88..5c4fa17 100644 (file)
@@ -249,6 +249,8 @@ parse_args (int argc, char **argv)
     }
   }
   while (next_option != -1);
+#else /* HAVE_GETOPT_H */
+  int optind = 1;
 #endif /* HAVE_GETOPT_H */
 
   // if unique, use the non option argument as the source