=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/getopt/getopt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- src/usr.bin/getopt/getopt.c 2009/10/27 23:59:38 1.8 +++ src/usr.bin/getopt/getopt.c 2015/10/07 06:39:16 1.9 @@ -1,4 +1,4 @@ -/* $OpenBSD: getopt.c,v 1.8 2009/10/27 23:59:38 deraadt Exp $ */ +/* $OpenBSD: getopt.c,v 1.9 2015/10/07 06:39:16 deraadt Exp $ */ /* * This material, written by Henry Spencer, was released by him @@ -8,6 +8,7 @@ #include #include #include +#include int main(int argc, char *argv[]) @@ -16,6 +17,9 @@ extern char *optarg; int c; int status = 0; + + if (tame("stdio", NULL) == -1) + err(1, "tame"); optind = 2; /* Past the program name and the option letters. */ while ((c = getopt(argc, argv, argv[1])) != -1)