Ticket #135 (closed defect: fixed)
Incorrect detection of sendfile functionality with Large File Support
| Reported by: | critson@… | Owned by: | jan |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Version: | 1.3.13 |
| Severity: | major | Keywords: | |
| Cc: | Blocked By: | ||
| Need User Feedback: | Blocking: |
Description
There are a number of Linux systems on which sendfile is not implemented for 64bit files, i.e. under Large File Support. However for a number of reasons these aren't detected by lighttpd's configure script, leading to a daemon which runs but cannot send any files.
The fixes I propose are as follows (both in configure.in): 1. Move Large File Support configuration before sendfile testing. 2. Make the sendfile test include sys/sendfile.h if it exists, otherwise by default a 32bit copy of sendfile will be linked as the system headers which macro sendfile to sendfile64 have not been loaded.
For a patch including both see http://www.perlfu.co.uk/code/lighttpd/lighttpd-1.3.13-broken-lfs-sendfile.diff.
I believe this altered configure should be compatible with platforms other than GNU/Linux, however I have not tested it.

