Skip to content

Commit

Permalink
[mod_webdav] typedef off_t loff_t for FreeBSD
Browse files Browse the repository at this point in the history
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)
gstrauss committed Dec 27, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 72b9bb5 commit 15bfe5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mod_webdav.c
Original file line number Diff line number Diff line change
@@ -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())

0 comments on commit 15bfe5e

Please sign in to comment.