optimizations #161
@ -20,7 +20,7 @@
|
||||
#include <sysexits.h> /* EX_OK, EX_OSERR, EX_USAGE */
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
# include <unistd.h> /* pledge(2) */
|
||||
# include <unistd.h> /* pledge(2), unveil(2) */
|
||||
#endif
|
||||
|
||||
char *program_name = "strcmp";
|
||||
@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
|
||||
unsigned int i;
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
if (pledge("stdio", NULL) == -1) {
|
||||
if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) {
|
||||
perror(argv[0] == NULL ? program_name : argv[0]);
|
||||
|
||||
return EX_OSERR;
|
||||
|
Loading…
Reference in New Issue
Block a user