22 lines
695 B
Text
22 lines
695 B
Text
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,
|