enable pledge by default on OpenBSD - gopherproxy-c - Gopher HTTP proxy in C (C… | |
git clone git://git.codemadness.org/gopherproxy-c | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 920fc67b93ffe777375e5be476c0da85962040eb | |
parent 46a7c58d416fe82d8b2d8aed37f9168574e33e46 | |
Author: Hiltjo Posthuma <[email protected]> | |
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(-) | |
--- | |
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 | |
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 | |