From 6f52101dc14d14414affb07b537619e4609daf6b Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Thu, 11 Jun 2020 19:00:46 +0200 Subject: Use pledge(3) only on OpenBSD --- calmwm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'calmwm.c') diff --git a/calmwm.c b/calmwm.c index 901c6ff..64adb8c 100644 --- a/calmwm.c +++ b/calmwm.c @@ -110,8 +110,10 @@ main(int argc, char **argv) xfd = x_init(display_name); cwm_status = CWM_RUNNING; +#ifdef __OpenBSD__ if (pledge("stdio rpath proc exec", NULL) == -1) err(1, "pledge"); +#endif memset(&pfd, 0, sizeof(pfd)); pfd[0].fd = xfd; -- cgit v1.2.3-2-gb3c3