about summary refs log tree commit diff
path: root/calmwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/calmwm.c b/calmwm.c
index b1c23ed..4111d95 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -19,7 +19,7 @@
  */
 
 #include <sys/types.h>
-#include <sys/queue.h>
+#include "queue.h"
 #include <sys/wait.h>
 
 #include <err.h>
@@ -104,15 +104,17 @@ 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;
 	pfd[0].events = POLLIN;
 	while (cwm_status == CWM_RUNNING) {
 		xev_process();
-		if (poll(pfd, 1, INFTIM) == -1) {
+		if (poll(pfd, 1, -1) == -1) {
 			if (errno != EINTR)
 				warn("poll");
 		}
@@ -208,7 +210,7 @@ sighdlr(int sig)
 	switch (sig) {
 	case SIGCHLD:
 		/* Collect dead children. */
-		while ((pid = waitpid(WAIT_ANY, &status, WNOHANG)) > 0 ||
+		while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
 		    (pid < 0 && errno == EINTR))
 			;
 		break;
@@ -220,7 +222,7 @@ sighdlr(int sig)
 	errno = save_errno;
 }
 
-__dead void
+void
 usage(void)
 {
 	extern char	*__progname;