]> git.sur5r.net Git - i3/i3/blobdiff - i3-nagbar/main.c
Ensure all *.[ch] files include config.h
[i3/i3] / i3-nagbar / main.c
index 38740774ee056d55c9acf647316bc4d177d86c03..2e9e77d490fe3af6e36c9383fc91880d40874d27 100644 (file)
@@ -8,6 +8,8 @@
  * when the user has an error in their configuration file.
  *
  */
+#include "libi3.h"
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -30,7 +32,6 @@
 #include <xcb/randr.h>
 #include <xcb/xcb_cursor.h>
 
-#include "libi3.h"
 #include "i3-nagbar.h"
 
 /** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
@@ -470,6 +471,11 @@ int main(int argc, char *argv[]) {
     font = load_font(pattern, true);
     set_font(&font);
 
+#if defined(__OpenBSD__)
+    if (pledge("stdio rpath wpath cpath getpw proc exec", NULL) == -1)
+        err(EXIT_FAILURE, "pledge");
+#endif
+
     xcb_rectangle_t win_pos = get_window_position();
 
     xcb_cursor_t cursor;