summaryrefslogtreecommitdiff
path: root/modules/generators
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-10-04 09:56:42 +0000
committerJoe Orton <jorton@apache.org>2019-10-04 09:56:42 +0000
commitf0abf7680380edc00c2204ba25692fdc9e5b0d46 (patch)
tree7db74b58ffc16b9dbf048f717441efe55d12f9ba /modules/generators
parent4a835a774558cdd773c875b82ea019b130aaf92d (diff)
downloadhttpd-f0abf7680380edc00c2204ba25692fdc9e5b0d46.tar.gz
Fix build broken w/o --enable-cgid-fdpassing by r1867968:
* modules/generators/cgi_common.h: Only define CGI bucket type if WANT_CGI_BUCKET is defined. * modules/generators/mod_cgi.c: Always include cgi_common.h, defining WANT_CGI_BUCKET iff APR_FILES_AS_SOCKETS is defined * modules/generators/mod_cgid.c: Always include cgi_common.h, defining WANT_CGI_BUCKET iff HAVE_CGID_FDPASSING (--enable-cgid-fdpassing). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1867971 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/generators')
-rw-r--r--modules/generators/cgi_common.h3
-rw-r--r--modules/generators/mod_cgi.c3
-rw-r--r--modules/generators/mod_cgid.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/modules/generators/cgi_common.h b/modules/generators/cgi_common.h
index 0ff66f94e3..85c96855ea 100644
--- a/modules/generators/cgi_common.h
+++ b/modules/generators/cgi_common.h
@@ -44,6 +44,7 @@ static void discard_script_output(apr_bucket_brigade *bb)
}
}
+#ifdef WANT_CGI_BUCKET
/* A CGI bucket type is needed to catch any output to stderr from the
* script; see PR 22030. */
static const apr_bucket_type_t bucket_type_cgi;
@@ -235,6 +236,8 @@ static const apr_bucket_type_t bucket_type_cgi = {
apr_bucket_copy_notimpl
};
+#endif /* WANT_CGI_BUCKET */
+
/* Handle the CGI response output, having set up the brigade with the
* CGI or PIPE bucket as appropriate. */
static int cgi_handle_response(request_rec *r, int nph, apr_bucket_brigade *bb,
diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c
index 5708aa0be6..8b96fd5190 100644
--- a/modules/generators/mod_cgi.c
+++ b/modules/generators/mod_cgi.c
@@ -569,8 +569,9 @@ static apr_status_t default_build_command(const char **cmd, const char ***argv,
}
#if APR_FILES_AS_SOCKETS
-#include "cgi_common.h"
+#define WANT_CGI_BUCKET
#endif
+#include "cgi_common.h"
static int cgi_handler(request_rec *r)
{
diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
index 90cd529735..102d2b3193 100644
--- a/modules/generators/mod_cgid.c
+++ b/modules/generators/mod_cgid.c
@@ -1349,11 +1349,12 @@ static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
return ret;
}
-#ifdef HAVE_CGID_FDPASSING
/* Pull in CGI bucket implementation. */
#define cgi_server_conf cgid_server_conf
-#include "cgi_common.h"
+#ifdef HAVE_CGID_FDPASSING
+#define WANT_CGI_BUCKET
#endif
+#include "cgi_common.h"
static int connect_to_daemon(int *sdptr, request_rec *r,
cgid_server_conf *conf)