aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-28 19:42:57 +0100
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2025-07-28 19:42:57 +0100
commit54d1c95b31af912939d711821c56c70ae82fa214 (patch)
tree2508aba7877e99cd34850b929f3199d22606c38d
parent6cb4c5c8451196aedb84ebd240a1c6a150bee35a (diff)
added support for OpenBSD pledge()
-rw-r--r--xwinwrap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xwinwrap.c b/xwinwrap.c
index b801cf3..32734ca 100644
--- a/xwinwrap.c
+++ b/xwinwrap.c
@@ -331,6 +331,9 @@ int main(int argc, char **argv) {
bool skip_pager = false;
bool daemonize = false;
+ if (pledge("stdio unix proc exec inet rpath", NULL) == -1)
+ fprintf(stderr, "pledge\n");
+
win_shape shape = SHAPE_RECT;
Pixmap mask;
GC mask_gc;
@@ -744,7 +747,7 @@ int main(int argc, char **argv) {
XSync(display, window.window);
- sprintf(widArg, "0x%x", (int)window.window);
+ snprintf(widArg, sizeof(widArg), "0x%x", (int)window.window);
pid = fork();