httpd: fix compile failure if !FEATURE_HTTPD_RANGES

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2021-12-26 14:29:37 +01:00
parent 4fe954c148
commit 97c00ae134

View File

@ -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;