enable pledge by default on OpenBSD - gopherproxy-c - Gopher HTTP proxy in C (CGI)
(HTM) git clone git://git.codemadness.org/gopherproxy-c
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 920fc67b93ffe777375e5be476c0da85962040eb
(DIR) parent 46a7c58d416fe82d8b2d8aed37f9168574e33e46
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 15 May 2019 19:24:09 +0200
enable pledge by default on OpenBSD
it exists since 5.9+
Diffstat:
M Makefile | 2 --
M gopherproxy.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
@@ -3,8 +3,6 @@
BIN = gopherproxy
OBJ = $(BIN:=.o)
-# OpenBSD: use pledge(2).
-#CFLAGS += -DUSE_PLEDGE
# build static: useful in www chroot.
LDFLAGS += -static
# Linux
(DIR) diff --git a/gopherproxy.c b/gopherproxy.c
@@ -14,7 +14,7 @@
#define MAX_RESPONSETIMEOUT 10 /* timeout in seconds */
#define MAX_RESPONSESIZ 4000000 /* max download size in bytes */
-#ifndef USE_PLEDGE
+#ifndef __OpenBSD__
#define pledge(a,b) 0
#endif