aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dmenu.c b/dmenu.c
index 7745947..3b2f3ec 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -6,6 +6,9 @@
6#include <string.h> 6#include <string.h>
7#include <strings.h> 7#include <strings.h>
8#include <time.h> 8#include <time.h>
9#ifdef __OpenBSD__
10#include <unistd.h>
11#endif
9 12
10#include <X11/Xlib.h> 13#include <X11/Xlib.h>
11#include <X11/Xatom.h> 14#include <X11/Xatom.h>
@@ -24,12 +27,6 @@
24#define LENGTH(X) (sizeof X / sizeof X[0]) 27#define LENGTH(X) (sizeof X / sizeof X[0])
25#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) 28#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
26 29
27#ifdef __OpenBSD__
28#include <unistd.h>
29#else
30#define pledge(a,b) 0
31#endif
32
33/* enums */ 30/* enums */
34enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ 31enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */
35 32
@@ -752,8 +749,10 @@ main(int argc, char *argv[])
752 die("no fonts could be loaded."); 749 die("no fonts could be loaded.");
753 lrpad = drw->fonts->h; 750 lrpad = drw->fonts->h;
754 751
752#ifdef __OpenBSD__
755 if (pledge("stdio rpath", NULL) < 0) 753 if (pledge("stdio rpath", NULL) < 0)
756 die("pledge"); 754 die("pledge");
755#endif
757 756
758 if (fast) { 757 if (fast) {
759 grabkeyboard(); 758 grabkeyboard();