From 15bfe5ef0e5cc6bdd4fff541783f804d84df90c8 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 27 Dec 2020 03:57:19 -0500 Subject: [PATCH] [mod_webdav] typedef off_t loff_t for FreeBSD FreeBSD provides an API similar to Linux copy_file_range() but uses off_t instead of loff_t in the syscall. off_t is equivalent to off64_t when lighttpd is built with LFS (and lighttpd is built with LFS enabled by default) --- src/mod_webdav.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 7372023b..591bfb89 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -4568,6 +4568,9 @@ mod_webdav_put_deprecated_unsafe_partial_put_compat (request_st * const r, } #ifdef HAVE_COPY_FILE_RANGE + #ifdef __FreeBSD__ + typedef off_t loff_t; + #endif /* use Linux copy_file_range() if available * (Linux 4.5, but glibc 2.27 provides a user-space emulation) * fd_in and fd_out must be on same mount (handled in mod_webdav_put_prep())