From 187daac42007c87e6af9317a20446e3b81907f63 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 25 May 2018 18:43:36 +0200 Subject: assume OpenBSD 5.9+, always try pledge(2) on OpenBSD --- stagit-index.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'stagit-index.c') diff --git a/stagit-index.c b/stagit-index.c index 6b7c699..e019793 100644 --- a/stagit-index.c +++ b/stagit-index.c @@ -21,10 +21,6 @@ static char description[255] = "Repositories"; static char *name = ""; static char owner[255]; -#ifndef USE_PLEDGE -#define pledge(p1,p2) 0 -#endif - void joinpath(char *buf, size_t bufsiz, const char *path, const char *path2) { @@ -164,8 +160,10 @@ main(int argc, char *argv[]) git_libgit2_init(); +#ifdef __OpenBSD__ if (pledge("stdio rpath", NULL) == -1) err(1, "pledge"); +#endif writeheader(stdout); -- cgit v1.2.3