summaryrefslogtreecommitdiff
path: root/usr.bin/gprof/gprof.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/gprof/gprof.c')
-rw-r--r--usr.bin/gprof/gprof.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/gprof/gprof.c b/usr.bin/gprof/gprof.c
index 2f38f9c3739..a83bcda6dd6 100644
--- a/usr.bin/gprof/gprof.c
+++ b/usr.bin/gprof/gprof.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gprof.c,v 1.22 2015/08/20 22:32:41 deraadt Exp $ */
+/* $OpenBSD: gprof.c,v 1.23 2015/11/16 17:43:17 pascal Exp $ */
/* $NetBSD: gprof.c,v 1.8 1995/04/19 07:15:59 cgd Exp $ */
/*
@@ -44,6 +44,9 @@ main(int argc, char *argv[])
nltype **timesortnlp;
char **defaultEs;
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ err(1, NULL);
+
--argc;
argv++;
debug = 0;
@@ -129,6 +132,10 @@ main(int argc, char *argv[])
} else {
gmonname = GMONNAME;
}
+ if ( sflag == FALSE ) {
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+ }
/*
* get information about a.out file.
*/