Blob Blame History Raw
The Linux sendfile function expects an off_t * argument, not an int *
argument. The patch avoids a stack out-of-bounds write in this
run-time test, and a compiler error with future compilers such as GCC
14.

Submitted upstream: <https://redmine.lighttpd.net/issues/3238>

diff -ur lighttpd-1.4.73.orig/configure.ac lighttpd-1.4.73/configure.ac
--- lighttpd-1.4.73.orig/configure.ac	2023-10-31 03:35:56.000000000 +0100
+++ lighttpd-1.4.73/configure.ac	2023-12-19 08:49:11.833311320 +0100
@@ -1557,7 +1557,7 @@
         #include <sys/socket.h>
         #include <sys/uio.h>
         int main(void) {
-          int o = 0;
+          off_t o = 0;
           if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
           return 0;
         }