SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
30
devel/rgbds/patches/patch-src_fix_main_c
Normal file
30
devel/rgbds/patches/patch-src_fix_main_c
Normal file
|
@ -0,0 +1,30 @@
|
|||
Index: src/fix/main.c
|
||||
--- src/fix/main.c.orig
|
||||
+++ src/fix/main.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "extern/getopt.h"
|
||||
|
||||
+#include "error.h"
|
||||
#include "helpers.h"
|
||||
#include "platform.h"
|
||||
#include "version.h"
|
||||
@@ -62,6 +63,8 @@ static struct option const longopts[] = {
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
};
|
||||
|
||||
+int pledge(const char *, const char *);
|
||||
+
|
||||
static void printUsage(void)
|
||||
{
|
||||
fputs(
|
||||
@@ -1221,6 +1224,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
nbErrors = 0;
|
||||
int ch;
|
||||
+
|
||||
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
|
||||
+ err("pledge");
|
||||
|
||||
while ((ch = musl_getopt_long_only(argc, argv, optstring, longopts, NULL)) != -1) {
|
||||
switch (ch) {
|
Loading…
Add table
Add a link
Reference in a new issue