diff options
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -24,6 +24,12 @@ | |||
24 | #define LENGTH(X) (sizeof X / sizeof X[0]) | 24 | #define LENGTH(X) (sizeof X / sizeof X[0]) |
25 | #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) | 25 | #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) |
26 | 26 | ||
27 | #ifdef __OpenBSD__ | ||
28 | #include <unistd.h> | ||
29 | #else | ||
30 | #define pledge(a,b) 0 | ||
31 | #endif | ||
32 | |||
27 | /* enums */ | 33 | /* enums */ |
28 | enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ | 34 | enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ |
29 | 35 | ||
@@ -746,6 +752,9 @@ main(int argc, char *argv[]) | |||
746 | die("no fonts could be loaded."); | 752 | die("no fonts could be loaded."); |
747 | lrpad = drw->fonts->h; | 753 | lrpad = drw->fonts->h; |
748 | 754 | ||
755 | if (pledge("stdio rpath", NULL) < 0) | ||
756 | die("pledge"); | ||
757 | |||
749 | if (fast) { | 758 | if (fast) { |
750 | grabkeyboard(); | 759 | grabkeyboard(); |
751 | readstdin(); | 760 | readstdin(); |