diff --git a/Games/Minesweeper/main.cpp b/Games/Minesweeper/main.cpp index c0bc6da9982..40a00b7ecf4 100644 --- a/Games/Minesweeper/main.cpp +++ b/Games/Minesweeper/main.cpp @@ -10,11 +10,23 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio rpath wpath cpath shared_buffer unix fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio rpath wpath cpath shared_buffer", nullptr) < 0) { + perror("pledge"); + return 1; + } + + auto window = GWindow::construct(); window->set_resizable(false); window->set_title("Minesweeper"); diff --git a/Games/Snake/main.cpp b/Games/Snake/main.cpp index 70290b2dca7..5b75d37867e 100644 --- a/Games/Snake/main.cpp +++ b/Games/Snake/main.cpp @@ -8,11 +8,22 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio rpath cpath shared_buffer unix fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_double_buffering_enabled(false);