31 lines
670 B
Text
31 lines
670 B
Text
|
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) {
|