diff --git a/programs/cmp_tool.c b/programs/cmp_tool.c
index 22082b8c2b16101b182fafe26b250cd8cce93b1d..8533d66317ab1b05a17d20dcef84e3aaff98b7bb 100644
--- a/programs/cmp_tool.c
+++ b/programs/cmp_tool.c
@@ -177,7 +177,7 @@ int testable_cmp_tool_main(int argc, char **argv)
 	model_id = DEFAULT_MODEL_ID;
 	model_counter = 0;
 
-	optreset = 1;
+	optind = 0;
 	return CMP_MAIN(argc, argv);
 }
 #else
diff --git a/test/fuzz/getopt_long_quiet.c b/test/fuzz/getopt_long_quiet.c
index 5cf6a55649bd4e0a7967e08e11741f81a949cd08..6b5e03c8e525468ab5124d66f471502ad58c9e31 100644
--- a/test/fuzz/getopt_long_quiet.c
+++ b/test/fuzz/getopt_long_quiet.c
@@ -49,7 +49,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <err.h>
+/* include <err.h> */
+__extension__
+#define warnx(format, ...) (void)0
 #include <errno.h>
 #include <getopt.h>
 #include <stdlib.h>
@@ -57,7 +59,7 @@
 
 #define GNU_COMPATIBLE		/* Be more compatible, configure's use us! */
 
-#if 0				/* we prefer to keep our getopt(3) */
+#if 1
 #define	REPLACE_GETOPT		/* use this getopt as the system getopt(3) */
 #endif