From 04a15a0c100642df4e4d3a41ef2acbcd0516b52d Mon Sep 17 00:00:00 2001
From: Johan Wikman <johan.wikman@nokia.com>
Date: Fri, 7 Nov 2014 15:16:57 +0200
Subject: [PATCH] MONGOOSE_NO_CGI needs special handling.

MONGOOSE_NO_CGI is implied by both NS_DISABLE_SOCKETPAIR and
MONGOOSE_NO_FILESYSTEM. Thus, so as not to get complaints about
the same define being defined twice, some extra checks are needed.
---
 mongoose.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mongoose.c b/mongoose.c
index bf13c0e14..1db4a210e 100644
--- a/mongoose.c
+++ b/mongoose.c
@@ -1317,13 +1317,15 @@ typedef pid_t process_id_t;
 #define MONGOOSE_IDLE_TIMEOUT_SECONDS 300
 #endif
 
-#ifdef NS_DISABLE_SOCKETPAIR
+#if defined(NS_DISABLE_SOCKETPAIR) && !defined(MONGOOSE_NO_CGI)
 #define MONGOOSE_NO_CGI
 #endif
 
 #ifdef MONGOOSE_NO_FILESYSTEM
 #define MONGOOSE_NO_AUTH
+#if !defined(MONGOOSE_NO_CGI)
 #define MONGOOSE_NO_CGI
+#endif
 #define MONGOOSE_NO_DAV
 #define MONGOOSE_NO_DIRECTORY_LISTING
 #define MONGOOSE_NO_LOGGING
-- 
GitLab