From: Jim Jagielski Date: Sat, 7 Oct 2000 00:37:18 +0000 (+0000) Subject: This is ugly, but at least we compile again on platforms that lack X-Git-Tag: APACHE_2_0_ALPHA_7~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3933b6d72f69bd4a27e40f5edb9ad8943d76c157;p=apache This is ugly, but at least we compile again on platforms that lack sendfile(). PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86423 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 759901e1dd..a6f1ffd429 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -3384,6 +3384,13 @@ static int core_output_filter(ap_filter_t *f, ap_bucket_brigade *b) } if (fd) { apr_hdtr_t hdtr; +#if APR_HAS_SENDFILE +/* + * TODO: fix the call to send_the_file somehow to remove the need for + * the apr_hdtr_t paramater if !APR_HAS_SENDFILE. The way it is + * now, we have to define a dummy apr_hdtr_t typedef and then + * wrap sections anyway. -- jj + */ memset(&hdtr, '\0', sizeof(hdtr)); if (nvec) { hdtr.numheaders = nvec; @@ -3393,6 +3400,7 @@ static int core_output_filter(ap_filter_t *f, ap_bucket_brigade *b) hdtr.numtrailers = nvec_trailers; hdtr.trailers = vec_trailers; } +#endif rv = send_the_file(c, fd, &hdtr, foffset, flen, &bytes_sent); } else {