Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -1138,6 +1143,11 @@ int main(int argc, char *argv[])
        before the relatively long-running game. */
     if (l_SaveOptions && (*ConfigHasUnsavedChanges)(NULL))
         (*ConfigSaveFile)();
+
+    if (pledge("stdio rpath wpath cpath inet flock unix dns sendfd recvfd prot_exec drm audio", NULL) == -1) {
+        fprintf(stderr, "pledge\n");
+        return 1;
+    }
 
     /* run the game */
     (*CoreDoCommand)(M64CMD_EXECUTE, 0, NULL);
