ports/devel/desktop-file-utils/patches/patch-src_validator_c

32 lines
701 B
Text

From 1926ae7021a2f8e842ad566a49f3a947c02cec92 Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@gnome.org>
Date: Fri, 19 Jun 2020 10:12:04 +0200
Subject: [PATCH] pledge: add support to remaining utilities
Index: src/validator.c
--- src/validator.c.orig
+++ src/validator.c
@@ -28,6 +28,9 @@
#include <locale.h>
+#ifdef HAVE_PLEDGE
+#include <unistd.h>
+#endif
#include "validate.h"
static gboolean warn_kde = FALSE;
@@ -50,6 +53,13 @@ main (int argc, char *argv[])
GError *error;
int i;
gboolean all_valid;
+
+#ifdef HAVE_PLEDGE
+ if (pledge ("stdio rpath", NULL) == -1) {
+ g_printerr ("pledge\n");
+ return 1;
+ }
+#endif
setlocale (LC_ALL, "");