From 073890215d5caa43973f3eb09b66072775ee6321 Mon Sep 17 00:00:00 2001 From: valenok Date: Wed, 3 Nov 2010 07:37:59 +0000 Subject: [PATCH] RTEMS fixes: removed mman.h include, and introduced NO_POPEN conditional --- mongoose.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 592b37b2..370fc48a 100644 --- a/mongoose.c +++ b/mongoose.c @@ -163,7 +163,6 @@ typedef struct DIR { #include #include #include -#include #include #include #include @@ -174,7 +173,9 @@ typedef struct DIR { #include #include #include +#if !defined(NO_SSL_DL) && !defined(NO_SSL) #include +#endif #include #if defined(__MACH__) #define SSL_LIB "libssl.dylib" @@ -3063,6 +3064,7 @@ static void do_ssi_include(struct mg_connection *conn, const char *ssi, } } +#if !defined(NO_POPEN) static void do_ssi_exec(struct mg_connection *conn, char *tag) { char cmd[BUFSIZ]; FILE *fp; @@ -3076,6 +3078,7 @@ static void do_ssi_exec(struct mg_connection *conn, char *tag) { (void) pclose(fp); } } +#endif // !NO_POPEN static void send_ssi_file(struct mg_connection *conn, const char *path, FILE *fp, int include_level) { @@ -3102,8 +3105,10 @@ static void send_ssi_file(struct mg_connection *conn, const char *path, } else { if (!memcmp(buf + 5, "include", 7)) { do_ssi_include(conn, path, buf + 12, include_level); +#if !defined(NO_POPEN) } else if (!memcmp(buf + 5, "exec", 4)) { do_ssi_exec(conn, buf + 9); +#endif // !NO_POPEN } else { cry(conn, "%s: unknown SSI " "command: \"%s\"", path, buf); }