summaryrefslogtreecommitdiff
path: root/stagit-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'stagit-index.c')
-rw-r--r--stagit-index.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/stagit-index.c b/stagit-index.c
index 1d26e0f..afd8320 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -23,6 +23,14 @@ static char description[255] = "Repositories";
static char *name = "";
static char owner[255];
+#ifndef USE_PLEDGE
+int
+pledge(const char *promises, const char *paths[])
+{
+ return 0;
+}
+#endif
+
/* Escape characters below as HTML 2.0 / XML 1.0. */
void
xmlencode(FILE *fp, const char *s, size_t len)
@@ -154,6 +162,9 @@ main(int argc, char *argv[])
char path[PATH_MAX], repodirabs[PATH_MAX + 1];
int i, ret = 0;
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
if (argc < 2) {
fprintf(stderr, "%s [repodir...]\n", argv[0]);
return 1;