=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/lex/main.c 2014/03/16 18:38:30 1.14 +++ src/usr.bin/lex/main.c 2015/10/10 05:47:54 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.14 2014/03/16 18:38:30 guenther Exp $ */ +/* $OpenBSD: main.c,v 1.15 2015/10/10 05:47:54 deraadt Exp $ */ /* flex - tool to generate fast lexical analyzers */ @@ -33,7 +33,7 @@ * PURPOSE. */ -/* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/main.c,v 1.14 2014/03/16 18:38:30 guenther Exp $ */ +/* $Header: /cvsrepo/anoncvs/cvs/src/usr.bin/lex/main.c,v 1.15 2015/10/10 05:47:54 deraadt Exp $ */ #include "flexdef.h" @@ -135,6 +135,13 @@ char **argv; { int i; + + if (pledge("stdio rpath wpath cpath", NULL) == -1) + { + fprintf( stderr, _( "%s: pledge\n" ), + program_name); + exit(1); + } #ifdef THINK_C argc = ccommand( &argv );