diff options
| author | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-07-27 23:32:27 +0100 |
|---|---|---|
| committer | ProsperousPotato <ProsperousPotato@users.noreply.github.com> | 2025-07-27 23:32:27 +0100 |
| commit | 8c42e565665bf1f97898359f93ca3927a76dc753 (patch) | |
| tree | 088bf595ccf19f4d7f710405549c5714375d2b78 /main.c | |
| parent | 4b4bfa9c4707eded5dc1d93dac316efe67666341 (diff) | |
add support for OpenBSD pledge()
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,7 @@ #include <X11/extensions/XInput2.h> +#include <unistd.h> + #include <stdio.h> static void xi_select_events(int); @@ -18,6 +20,12 @@ void xi_select_events(const int event) { } int main(void) { + +#ifdef __OpenBSD__ + if (pledge("stdio unix inet rpath", NULL) == -1) + fprintf(stderr, "pledge: failed\n"); +#endif + if (!(d = XOpenDisplay(NULL))) { printf("Couldn't open Display.\n"); return 1; |
