Commit Diff
Commit:
1ef91f4e91bb4740b47afd313e3c2abb48baa858
From:
Omar Polo <omar.polo@europecom.net>
Date:
Tue Jul 3 13:42:01 2018 UTC
Message
pledge added! :tada: closing #2
commit - 14291de3b2d18ecf647f9a7363d2286a3782d721
commit + 1ef91f4e91bb4740b47afd313e3c2abb48baa858
blob - 83cd59c6746c9a2ee1f11144e3ae8026adb4a1e9
blob + 26678cf2174363d86caa77a1898c99dedb9d70ab
--- Makefile
+++ Makefile
@@ -4,6 +4,9 @@ CDEFS = -DUSE_XINERAMA -DUSE_XFT -DUSE_STRCASESTR
OPTIONAL = xinerama xft
CDEFS = -DUSE_XINERAMA -DUSE_XFT -DUSE_STRCASESTR
+# decomment if you're using OpenBSD to add pledge(2) support
+#CDEFS += -DHAVE_PLEDGE
+
# you may not want to change these
CC ?= cc
LIBS = `pkg-config --libs x11 $(OPTIONAL)`
blob - 71c4aad0fc4e5a2bbf7616616d97d498337d80a9
blob + 5f0d7aaf7307a40428d44b6ee31510949f4a67ea
--- mymenu.c
+++ mymenu.c
@@ -815,6 +815,12 @@ int main(int argc, char **argv) {
}
int main(int argc, char **argv) {
+#ifdef HAVE_PLEDGE
+ // stdio & rpat: to read and write stdio/stdout
+ // unix: to connect to Xorg
+ pledge("stdio rpath unix", "");
+#endif
+
// by default the first completion isn't selected
bool first_selected = false;
Omar Polo