SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View 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) {