Introduction
Introduction Statistics Contact Development Disclaimer Help
add USE_PLEDGE macro for pledge(2) - saait - the most boring static page genera…
git clone git://git.codemadness.org/saait
Log
Files
Refs
README
LICENSE
---
commit b745b567b2a00df14039e634f05eb6fa168c6039
parent 8d6a1aebbe14e7340d537d9b7db20a1d7c2872bf
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 4 Aug 2017 15:39:35 +0200
add USE_PLEDGE macro for pledge(2)
Diffstat:
M saait.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/saait.c b/saait.c
@@ -20,6 +20,10 @@ char *argv0;
static struct variable *global;
+#ifndef USE_PLEDGE
+#define pledge(p1,p2) 0
+#endif
+
/* Escape characters below as HTML 2.0 / XML 1.0. */
void
xmlencode(const char *s, FILE *fp)
@@ -333,12 +337,10 @@ main(int argc, char *argv[])
char file[PATH_MAX + 1], htmlfile[PATH_MAX + 1], outputfile[PATH_MAX +…
int i, j, k, r;
-#ifdef __OpenBSD__
if (pledge("stdio cpath rpath wpath", NULL) == -1) {
fprintf(stderr, "pledge: %s\n", strerror(errno));
return 1;
}
-#endif
ARGBEGIN {
case 'c':
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.