SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
22
devel/rgbds/patches/patch-src_link_main_c
Normal file
22
devel/rgbds/patches/patch-src_link_main_c
Normal file
|
@ -0,0 +1,22 @@
|
|||
Index: src/link/main.c
|
||||
--- src/link/main.c.orig
|
||||
+++ src/link/main.c
|
||||
@@ -167,6 +167,8 @@ FILE *openFile(char const *fileName, char const *mode)
|
||||
// Short options
|
||||
static const char *optstring = "dl:m:Mn:O:o:p:S:s:tVvWwx";
|
||||
|
||||
+int pledge(const char *, const char *);
|
||||
+
|
||||
/*
|
||||
* Equivalent long options
|
||||
* Please keep in the same order as short opts
|
||||
@@ -359,6 +361,9 @@ int main(int argc, char *argv[])
|
||||
int optionChar;
|
||||
char *endptr; // For error checking with `strtoul`
|
||||
unsigned long value; // For storing `strtoul`'s return value
|
||||
+
|
||||
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
|
||||
+ err("pledge");
|
||||
|
||||
// Parse options
|
||||
while ((optionChar = musl_getopt_long_only(argc, argv, optstring,
|
Loading…
Add table
Add a link
Reference in a new issue