summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2021-12-26 14:29:37 +0100
committerDenys Vlasenko2021-12-26 14:29:37 +0100
commit97c00ae13439ad8114ad7d2150c8dde464f04eb1 (patch)
treeb3a026f18b472c6d1ba0980aac2b7fcf12c059fc /networking
parent4fe954c14851d2f913c41c581cbe49300b0984e4 (diff)
downloadbusybox-97c00ae13439ad8114ad7d2150c8dde464f04eb1.zip
busybox-97c00ae13439ad8114ad7d2150c8dde464f04eb1.tar.gz
httpd: fix compile failure if !FEATURE_HTTPD_RANGES
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 1ba1d10..3304516 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1880,9 +1880,13 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
#if ENABLE_FEATURE_USE_SENDFILE
{
off_t offset;
+# if ENABLE_FEATURE_HTTPD_RANGES
if (range_start < 0)
range_start = 0;
offset = range_start;
+# else
+ offset = 0;
+# endif
while (1) {
/* sz is rounded down to 64k */
ssize_t sz = MAXINT(ssize_t) - 0xffff;