[git commit] httpd: fix compile failure if !FEATURE_HTTPD_RANGES
Denys Vlasenko
vda.linux at googlemail.com
Sun Dec 26 13:29:37 UTC 2021
commit: https://git.busybox.net/busybox/commit/?id=97c00ae13439ad8114ad7d2150c8dde464f04eb1
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/httpd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/networking/httpd.c b/networking/httpd.c
index 1ba1d1063..33045163f 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;
More information about the busybox-cvs
mailing list